]> git.ipfire.org Git - thirdparty/util-linux.git/commit
whereis: fix const qualifier warnings for C23
authorKarel Zak <kzak@redhat.com>
Thu, 27 Nov 2025 15:46:22 +0000 (16:46 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 8 Dec 2025 13:48:07 +0000 (14:48 +0100)
commit1f58ebe18a233da355d6d50de766a232f72d29c2
treeffbd08b2be486de905bec95b09812fd6e537c47b
parent21a430258ac1c7862aefc8e4c655cb25fe038d85
whereis: fix const qualifier warnings for C23

Fix const qualifier discarded warnings in dirlist_add_subdir() and
lookup() functions. These warnings are reported by gcc 15 which
defaults to the C23 standard.

The strchr() and strrchr() functions return pointers into const strings,
so the receiving variables must be declared as const char *.

Signed-off-by: Karel Zak <kzak@redhat.com>
(cherry picked from commit 01018b74163f9122c75179a7c991b0aa0f8c603c)
misc-utils/whereis.c