In libgcrypt (current), we have a code like:
static const char names[N_COMPONENTS] = "pabgnq";
While it is valid code in C (a bit non-optimized code as it allocates unused NUL, though), newer GCC (15 or later) emits warning:
../../../wg/libgcrypt/cipher/ecc.c: In function 'compute_keygrip': ../../../wg/libgcrypt/cipher/ecc.c:1702:43: warning: initializer-string for array of 'char' truncates NUL terminator but destination lacks 'nonstring' attribute (7 chars into 6 available) [-Wunterminated-string-initialization] 1702 | static const char names[N_COMPONENTS] = "pabgnq"; | ^~~~~~~~
To silence this, let us add __attribute__((__nonstring__)) for these use cases.