zkey: Fix 'assignment discards 'const' qualifier' warnings

Fix compile warnings like

   warning: assignment discards 'const' qualifier from pointer target type
                                                   [-Wdiscarded-qualifiers]

by declaring the variables as const or cast appropriately.

Reviewed-by: Finn Callies <fcallies@linux.ibm.com>
Signed-off-by: Ingo Franzki <ifranzki@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Ingo Franzki
2026-06-08 09:18:39 +02:00
committed by Jan Höppner
parent 679ab77b96
commit 27f20495a7
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -1423,7 +1423,7 @@ static int _keystore_volume_check(const char *volume, bool remove, bool set,
}
info->volume = util_strdup(volume);
ch = strchr(info->volume, ':');
ch = (char *)strchr(info->volume, ':');
if (ch == NULL || strlen(ch + 1) == 0) {
warnx("Volume specification must contain a dm-crypt mapping "
"name separated by a colon");