mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
gnulib: Handle warnings introduced by updated gnulib
- Fix type of size variable in luks2_verify_key() - Avoid redefinition of SIZE_MAX and ATTRIBUTE_ERROR - Work around gnulib's int types on older compilers Signed-off-by: Robbie Harwood <rharwood@redhat.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
2b79024598
commit
49b52b4d87
5 files changed
+15
-6
No files matched your search
@@ -390,7 +390,7 @@ luks2_verify_key (grub_luks2_digest_t *d, grub_uint8_t *candidate_key,
|
||||
{
|
||||
grub_uint8_t candidate_digest[GRUB_CRYPTODISK_MAX_KEYLEN];
|
||||
grub_uint8_t digest[GRUB_CRYPTODISK_MAX_KEYLEN], salt[GRUB_CRYPTODISK_MAX_KEYLEN];
|
||||
grub_size_t saltlen = sizeof (salt), digestlen = sizeof (digest);
|
||||
idx_t saltlen = sizeof (salt), digestlen = sizeof (digest);
|
||||
const gcry_md_spec_t *hash;
|
||||
gcry_err_code_t gcry_ret;
|
||||
|
||||
@@ -429,7 +429,7 @@ luks2_decrypt_key (grub_uint8_t *out_key,
|
||||
grub_uint8_t area_key[GRUB_CRYPTODISK_MAX_KEYLEN];
|
||||
grub_uint8_t salt[GRUB_CRYPTODISK_MAX_KEYLEN];
|
||||
grub_uint8_t *split_key = NULL;
|
||||
grub_size_t saltlen = sizeof (salt);
|
||||
idx_t saltlen = sizeof (salt);
|
||||
char cipher[32], *p;
|
||||
const gcry_md_spec_t *hash;
|
||||
gcry_err_code_t gcry_ret;
|
||||
|
||||
@@ -25,7 +25,11 @@
|
||||
#define USHRT_MAX GRUB_USHRT_MAX
|
||||
#define UINT_MAX GRUB_UINT_MAX
|
||||
#define ULONG_MAX GRUB_ULONG_MAX
|
||||
#define SIZE_MAX GRUB_SIZE_MAX
|
||||
|
||||
/* gnulib also defines this type */
|
||||
#ifndef SIZE_MAX
|
||||
# define SIZE_MAX GRUB_SIZE_MAX
|
||||
#endif
|
||||
|
||||
#define SCHAR_MIN GRUB_SCHAR_MIN
|
||||
#define SCHAR_MAX GRUB_SCHAR_MAX
|
||||
|
||||
Reference in new issue
Block a user