]> git.ipfire.org Git - thirdparty/util-linux.git/commit
partx: fix const qualifier warning in get_max_partno
authorKarel Zak <kzak@redhat.com>
Thu, 27 Nov 2025 15:48:53 +0000 (16:48 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 8 Dec 2025 13:48:07 +0000 (14:48 +0100)
commit8aaf7e2ea5f4ff6b8c9890f40f71a95eb3fcfb11
tree9bdc2f477f8e2afe62fd11af9c300072b07e5748
parent2d3ab47ab080cd37bd4fadf6d5ad879bde528603
partx: fix const qualifier warning in get_max_partno

Fix const qualifier discarded warning in get_max_partno().
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>
(cherry picked from commit 4c94ce5d05d97420df7a512bbbaee8c4017414ae)
disk-utils/partx.c