]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libblkid: fix const qualifier warning in blkid_parse_tag_string
authorKarel Zak <kzak@redhat.com>
Thu, 27 Nov 2025 15:28:41 +0000 (16:28 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 27 Nov 2025 15:30:53 +0000 (16:30 +0100)
commitc45442ef125270d0ab2cb539747ccaf737d60d37
tree0ea1408a3114c0b685ef6eb62bc7e77b9aad50ca
parent530bf5c5b071753e149699c638ad1820daf5c205
libblkid: fix const qualifier warning in blkid_parse_tag_string

Fix const qualifier discarded warning in blkid_parse_tag_string().
This warning is reported by gcc 15 which defaults to the C23 standard.

The strchr() function returns a pointer into a const string, so
introduce a separate 'eq' variable to hold this const pointer for
finding the '=' separator. Also move the 'cp' variable declaration
into the block where it's actually used for quote handling.

Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid/src/tag.c