summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_parse.c
diff options
context:
space:
mode:
authorAndrew Clayton <a.clayton@nginx.com>2025-03-18 04:50:24 +0000
committerAndrew Clayton <a.clayton@nginx.com>2025-03-19 17:53:00 +0000
commit764ad73fc7e3cbbe48b259159340e063f7d7b082 (patch)
treeefdc3832c52c4abf53eb5b1286a21e4f2885a325 /src/nxt_parse.c
parentd7afeb2b94f1cd72ed02403609e5484f9514e5eb (diff)
downloadunit-764ad73fc7e3cbbe48b259159340e063f7d7b082.tar.gz
unit-764ad73fc7e3cbbe48b259159340e063f7d7b082.tar.bz2
auto/clang: Add a NXT_NONSTRING macro
This is a wrapper around __attribute__ ((__nonstring__)). Traditionally this was used to mark char array variables that intentionally lacked a terminating NUL byte, this would then cause warning to either be quelled or emitted for various memory/string functions. GCC 15 introduced a new warning, Wunterminated-string-initialization, which will always warn on things like static const char hex[16] = "0123456789ABCDEF"; However this is very much intentionally not NUL terminated. When the Wunterminated-string-initialization patch went in, the "nonstriong" attribute didn't quell this warning, however a patch has since gone in (prior to the GCC 15 release) to enable this attribute to quell this warning. In Unit we disabled this new warning with an eye to being able to re-enable it again, this patch is the first in a series to do just that. So the above example would become static const char hex[16] NXT_NONSTRING = "0123456789ABCDEF"; Link: <https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=44c9403ed1833ae71a59e84f9e37af3182be0df5> Link: <https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=622968990beee7499e951590258363545b4a3b57> Link: <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117178#c21> Cc: Alejandro Colomar <alx@kernel.org> Reviewed-by: Alejandro Colomar <alx@kernel.org> Signed-off-by: Andrew Clayton <a.clayton@nginx.com>
Diffstat (limited to 'src/nxt_parse.c')
0 files changed, 0 insertions, 0 deletions