Commit e8eccaf
committed
Annotate non NUL-terminated character array
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";
| ^~~~~~~~~~~~~~~~~~1 parent 547c2cd commit e8eccaf
File tree
1 file changed
+1
-0
lines changed1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | 41 | | |
| |||
0 commit comments