[PATCH 10/59] nss: Suppress clang -Wstring-plus-int on __nss_shlib_revision definition
Florian Weimer
fweimer@redhat.com
Fri Oct 17 19:40:28 GMT 2025
* Adhemerval Zanella:
> +/* clang issues an warning adding 'unsigned long' to a string does not append
> + to the string. e. */
> +DIAG_PUSH_NEEDS_COMMENT_CLANG;
> +DIAG_IGNORE_NEEDS_COMMENT_CLANG (18, "-Wstring-plus-int");
> static const char *const __nss_shlib_revision
> = LIBNSS_FILES_SO + sizeof("libnss_files.so") - 1;
> +DIAG_POP_NEEDS_COMMENT_CLANG;
Does this work instead?
&LIBNSS_FILES_SO[sizeof("libnss_files.so") - 1]
Thanks,
Florian
More information about the Libc-alpha
mailing list