OpenAFS Master Repository branch, openafs-stable-1_8_x, updated. openafs-stable-1_8_15-12-g7e3397d
Gerrit Code Review
gerrit@openafs.org
Thu, 2 Apr 2026 12:26:59 -0400
The following commit has been merged in the openafs-stable-1_8_x branch:
commit 7e3397d4c1187ee691937b1bb73185d818af3c06
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 23 19:50:56 2026 -0400
Fix -Wdiscarded-qualifiers warnings from strrchr()
In recent versions of GCC (e.g. GCC 14) and of glibc (e.g., 2.43), the
strrchr() function has been updated to follow ISO C23 rules, which can
trigger the discarded-qualifiers warning when the strrchr() input is a
`const char *` but the function return is assigned to a type `char *`.
Assigning this result to a `char *` discards the const qualifier, which
causes the following build failure when building with the
--enable-checking configure option (which adds -Werror to the CFLAGS):
compile_et.c:170:7: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
170 | p = strrchr(whoami, '/');
| ^
cc1: all warnings being treated as errors
Change the strrchr() destination pointer from `char *` to `const char *`
in the locations where the input string is a const char *.
Add a new local variable in compile_et.c for the destination pointer,
since the `char *` variable is reused in the affected function.
Reviewed-on: https://gerrit.openafs.org/16750
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
(cherry picked from commit a2887dbec96a3da5af5ff932032b936930b305f7)
Change-Id: I0780580fcec7429ce10cf8cb2be6855d2f55de48
Reviewed-on: https://gerrit.openafs.org/16751
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/bozo/bos.c | 2 +-
src/comerr/compile_et.c | 8 +++++---
src/tests/warnerr.c | 4 ++--
3 files changed, 8 insertions(+), 6 deletions(-)
--
OpenAFS Master Repository