[PATCH v3 08/19] nss: Suppress clang -Wstring-plus-int on __nss_shlib_revision definition
Adhemerval Zanella
adhemerval.zanella@linaro.org
Fri Oct 31 20:00:41 GMT 2025
clang issues an warning that adding 'unsigned long' to a string does not
append to the string.
---
nss/nss_module.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nss/nss_module.c b/nss/nss_module.c
index 3cd1940b225..ac94e4d3f02 100644
--- a/nss/nss_module.c
+++ b/nss/nss_module.c
@@ -41,7 +41,7 @@
pointer manipulation. The "-1" accounts for the trailing NUL
included in the sizeof. */
static const char *const __nss_shlib_revision
- = LIBNSS_FILES_SO + sizeof("libnss_files.so") - 1;
+ = &LIBNSS_FILES_SO[sizeof("libnss_files.so") - 1];
/* A single-linked list used to implement a mapping from service names
to NSS modules. (Most systems only use five or so modules, so a
--
2.43.0
More information about the Libc-alpha
mailing list