mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-15 04:40:05 +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:
@@ -299,7 +299,8 @@ const char *key_type_name(key_type_t type)
|
||||
|
||||
key_type_t keyring_type_and_name(const char *key_name, const char **name)
|
||||
{
|
||||
char type[16], *name_tmp;
|
||||
const char *name_tmp;
|
||||
char type[16];
|
||||
size_t type_len;
|
||||
|
||||
if (!key_name || key_name[0] != '%')
|
||||
|
||||
Reference in New Issue
Block a user