util/resolve: Save str[r]chr() ret val to const data ptr

With glibc-2.43 implementing the C23 standard, strrchr() and strchr()
now return "const char *" when its first argument is "const char *".

The fix is update all pointers receiving strrchr() and strchr()'s return
values so that they are now "const char *" instead of "char *".

Signed-off-by: Nicholas Vinson <nvinson234@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Nicholas Vinson authored and Daniel Kiper committed 2026-02-26 15:59:23 +01:00
1 parent 9f4a586f12
commit ce6f2b57f5
1 file changed
+5 -5
+5 -5
View File
@@ -138,12 +138,12 @@ read_dep_list (FILE *fp)
static char * static char *
get_module_name (const char *str) get_module_name (const char *str)
{ {
char *base; const char *base;
char *ext; const char *ext;
base = strrchr (str, '/'); base = strrchr (str, '/');
if (! base) if (! base)
base = (char *) str; base = str;
else else
base++; base++;
@@ -164,9 +164,9 @@ get_module_name (const char *str)
static char * static char *
get_module_path (const char *prefix, const char *str) get_module_path (const char *prefix, const char *str)
{ {
char *dir; const char *dir;
char *base; char *base;
char *ext; const char *ext;
char *ret; char *ret;
ext = strrchr (str, '.'); ext = strrchr (str, '.');