Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

cgzones
Copy link
Contributor

@cgzones cgzones commented Mar 16, 2025

No description provided.

cgzones added 4 commits March 16, 2025 17:01
All important function results should be and are handled.
Spotted with the compiler flag -Wzero-as-null-pointer-constant.
Do not add this flag though, due to an occurrence in gperf generated
code:

    ../src/netlog/netlog-gperf.gperf: In function ‘netlog_gperf_lookup’:
    ../src/netlog/netlog-gperf.gperf:38:10: warning: zero as null pointer constant [-Wzero-as-null-pointer-constant]
Static asserts without a comment are a language extension.
The lookup table in hexchar() is of the size of its number of elements
and thus not implicitly NUL-terminated. Add the nonstring annotation to
please GCC 15:

    ../src/share/hexdecoct.c: In function ‘hexchar’:
    ../src/share/hexdecoct.c:38:39: warning: initializer-string for array of ‘char’ truncates NUL terminator but destination lacks ‘nonstring’ attribute (17 chars into 16 available) [-Wunterminated-string-initialization]
       38 |         static const char table[16] = "0123456789abcdef";
          |                                       ^~~~~~~~~~~~~~~~~~
@ssahani ssahani merged commit cb728a8 into systemd:main Apr 1, 2025
1 check passed
@cgzones cgzones deleted the misc branch April 1, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants