https://bugs.openldap.org/show_bug.cgi?id=9898
Issue ID: 9898 Summary: slapd-addel.c contains invalid struct initialization which does not compile on HP-UX aCC Product: OpenLDAP Version: 2.6.3 Hardware: All OS: Other Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: slapd Assignee: bugs@openldap.org Reporter: michael.osipov@siemens.com Target Milestone: ---
My compiler (cc: HP C/aC++ B3910B A.06.29 [Oct 18 2016]) gives me: /opt/aCC/bin/aCC -Ae -g -I../../include -I../../include -I/opt/ports/include -I/opt/ports/include -c -o slapd-addel.o slapd-addel.c "slapd-addel.c", line 68: error #2029: expected an expression LDIFRecord record = {}; ^
"slapd-addel.c", line 70: error #2029: expected an expression struct berval bv = {}; ^
This is invalid C code, it can be easily solved by using "{0}" and the code does compile.
https://bugs.openldap.org/show_bug.cgi?id=9898
Howard Chu hyc@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |IN_PROGRESS
--- Comment #1 from Howard Chu hyc@openldap.org --- Fixed in https://git.openldap.org/openldap/openldap/-/merge_requests/555 along with ITS#9899
https://bugs.openldap.org/show_bug.cgi?id=9898
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Assignee|bugs@openldap.org |hyc@openldap.org
https://bugs.openldap.org/show_bug.cgi?id=9898
--- Comment #2 from Howard Chu hyc@openldap.org --- By the way, the syntax in the existing code will be legal in C23. You should consider using a newer compiler.
https://thephd.dev/ever-closer-c23-improvements#consistent-warningless-and-i...
https://bugs.openldap.org/show_bug.cgi?id=9898
--- Comment #3 from michael.osipov@siemens.com --- (In reply to Howard Chu from comment #2)
By the way, the syntax in the existing code will be legal in C23. You should consider using a newer compiler.
https://thephd.dev/ever-closer-c23-improvements#consistent-warningless-and- intuitive-initialization-with--
C23 is so far away for many and me that this system won't exist back then. HPE promises me now for years a new compiler...commercial BS.
https://bugs.openldap.org/show_bug.cgi?id=9898
--- Comment #4 from michael.osipov@siemens.com --- (In reply to michael.osipov from comment #3)
(In reply to Howard Chu from comment #2)
By the way, the syntax in the existing code will be legal in C23. You should consider using a newer compiler.
https://thephd.dev/ever-closer-c23-improvements#consistent-warningless-and- intuitive-initialization-with--
C23 is so far away for many and me that this system won't exist back then. HPE promises me now for years a new compiler...commercial BS.
remove "back"
https://bugs.openldap.org/show_bug.cgi?id=9898
--- Comment #5 from Howard Chu hyc@openldap.org --- You could just build gcc or clang for your HPUX systems instead.
Anyway, thanks for the reports, fixes will probably be merged soon.
https://bugs.openldap.org/show_bug.cgi?id=9898
--- Comment #6 from michael.osipov@siemens.com --- (In reply to Howard Chu from comment #5)
You could just build gcc or clang for your HPUX systems instead.
Anyway, thanks for the reports, fixes will probably be merged soon.
Good joke. There is no GCC (died at 4.2.1) or LLVM (never ported) on HP-UX. Only the HP aC/aC++. So I have to use either this one or don't use any OSS.
https://bugs.openldap.org/show_bug.cgi?id=9898
--- Comment #7 from michael.osipov@siemens.com --- OpenLDAP is crucial to make msktutil(1) to run which I co-maintain on multiple platforms.
https://bugs.openldap.org/show_bug.cgi?id=9898
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs_review | Target Milestone|--- |2.5.14
https://bugs.openldap.org/show_bug.cgi?id=9898
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |TEST
--- Comment #8 from Quanah Gibson-Mount quanah@openldap.org --- HEAD:
• 21abafcc by Howard Chu at 2022-08-22T16:44:05+00:00 ITS#9898 tests: fix slapd-addel non-std syntax
RE26:
• 4b80529d by Howard Chu at 2022-08-24T17:59:20+00:00 ITS#9898 tests: fix slapd-addel non-std syntax
RE25:
• 4b80529d by Howard Chu at 2022-08-24T17:59:20+00:00 ITS#9898 tests: fix slapd-addel non-std syntax
https://bugs.openldap.org/show_bug.cgi?id=9898
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |VERIFIED Resolution|TEST |FIXED