mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-14 12:20:00 +01:00
Fix C std23 related warnings with new glibc.
C standard library functions now preserves qualifiers passed to some functions. In case of strchr() if the passed argument is const qualified also the returned value is const qualified. Similarly if the passed argument is not const qualified neither is the return value. This patch makes libcryptsetup compliant with the change and should be backward compatible with older std libraries. Thanks Vojta Trefny for heads-up.
This commit is contained in:
@@ -3287,7 +3287,7 @@ int dm_is_dm_kernel_name(const char *name)
|
||||
int dm_uuid_cmp(const char *dm_uuid, const char *hdr_uuid)
|
||||
{
|
||||
int i, j;
|
||||
char *str;
|
||||
const char *str;
|
||||
|
||||
if (!dm_uuid || !hdr_uuid)
|
||||
return -EINVAL;
|
||||
@@ -3322,7 +3322,7 @@ int dm_uuid_cmp(const char *dm_uuid, const char *hdr_uuid)
|
||||
int dm_uuid_integrity_cmp(const char *dm_uuid, const char *dmi_uuid)
|
||||
{
|
||||
int i;
|
||||
char *str, *stri;
|
||||
const char *str, *stri;
|
||||
|
||||
if (!dm_uuid || !dmi_uuid)
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user