Assorted build fixes and improvements
This includes the fix from !2029 (closed) among other minor fixes.
-
build: ignore new functions at "make abi-check-latest"
-
build: pacify GCC analyzer false-positive in src/ocsptool.c
Without the guard (chain_size - 1), GCC analyzer spews the warning below, which should be a false-positive:
ocsptool.c:532:32: warning: use of uninitialized value 'chain[1]' [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
532 | signer = chain[1];
| ~~~~~~~^~~~~~~~~~
- lib: Fix Wunterminated-string-initialization warnings
Building on a newer gcc version (15) results in the following warnings:
status_request.c: In function 'client_send':
status_request.c:71:33: warning: initializer-string for array of 'unsigned char' truncates NUL terminator but destination lacks 'nonstring' attribute (6 chars into 5 available) [-Wunterminated-string-initialization]
71 | const uint8_t data[5] = "\x01\x00\x00\x00\x00";
| ^~~~~~~~~~~~~~~~~~~~~~
x86-common.c: In function 'check_phe_partial':
x86-common.c:342:31: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (65 chars into 64 available) [-Wunterminated-string-initialization]
342 | const char text[64] = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
build: exclude duplicate entries in src/mech-list.h
-
build: derive the location of default config file from $sysconfdir
Previously we hard-coded "/etc" as part of the path of the default configuration file. It is more palatable to respect the --sysconfdir configure option and locate the file there.
Per recommendation at [1], the path is expanded at "make" time, not at "configure" time.
Checklist
-
Commits have Signed-off-by:with name/author being identical to the commit author -
Code modified for feature -
Test suite updated with functionality tests -
Test suite updated with negative tests -
Documentation updated / NEWS entry present (for non-trivial changes)
Reviewer's checklist:
-
Any issues marked for closing are addressed -
There is a test suite reasonably covering new functionality or modifications -
Function naming, parameters, return values, types, etc., are consistent and according to CONTRIBUTION.md -
This feature/change has adequate documentation added -
No obvious mistakes in the code
Edited by Alexander Sosedkin