mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zkey/kmip: 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:
committed by
Jan Höppner
parent
27f20495a7
commit
d04d331673
@@ -115,11 +115,11 @@ int profile_read(struct plugin_handle *ph, const char *profile_dir,
|
||||
|
||||
prof = util_zalloc(sizeof(struct kmip_profile));
|
||||
|
||||
tok = strrchr(profile_file, '/');
|
||||
tok = (char *)strrchr(profile_file, '/');
|
||||
if (tok == NULL)
|
||||
tok = (char *)profile_file;
|
||||
prof->name = util_strdup(tok);
|
||||
tok = strchr(prof->name, '.');
|
||||
tok = (char *)strchr(prof->name, '.');
|
||||
if (tok != NULL)
|
||||
*tok = 0;
|
||||
|
||||
|
||||
@@ -4740,7 +4740,8 @@ out:
|
||||
static char *_parse_label(struct plugin_handle *ph, const char *label,
|
||||
enum kms_key_mode key_mode)
|
||||
{
|
||||
char *tok, *ret = NULL;
|
||||
char *ret = NULL;
|
||||
const char *tok;
|
||||
|
||||
tok = strchr(label, ':');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user