Fix const qualifier discarded warning in readlink_to_namei().
This warning is reported by gcc 15 which defaults to the C23 standard.
The strrchr() function returns a pointer into a const string, so the
receiving variable must be declared as const char *.
Signed-off-by: Karel Zak <kzak@redhat.com>
if (sz < 1)
err(EXIT_FAILURE, _("failed to read symlink: %s"), path);
if (*sym != '/') {
- char *p = strrchr(path, '/');
+ const char *p = strrchr(path, '/');
if (p) {
isrel = 1;