]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: fix const qualifier warnings for C23
authorKarel Zak <kzak@redhat.com>
Thu, 27 Nov 2025 14:45:55 +0000 (15:45 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 8 Dec 2025 13:48:07 +0000 (14:48 +0100)
commit95a4937e40d7f2351e7ffcb88744ead2bb827ee5
tree25a2e4260172b210f331ec87e55c08818a243423
parent8b3f70ce1755e9140badd212b05609703d853c9a
libmount: fix const qualifier warnings for C23

Fix const qualifier discarded warnings in optlist_add_flags(),
mnt_opt_value_with(), and mnt_optstr_apply_flags() functions.
These warnings are reported by gcc 15 which defaults to the C23 standard.

The strchr() and strstr() 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 c0c79c41527365ca7de30c75daaa018ea01fff97)
libmount/src/optlist.c
libmount/src/optstr.c