[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/1] libgcrypt: avoid -Wsign-compare in rijndael do_setkey
From: |
Daniel Kiper |
Subject: |
Re: [PATCH 1/1] libgcrypt: avoid -Wsign-compare in rijndael do_setkey |
Date: |
Fri, 13 Aug 2021 15:29:57 +0200 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Fri, Aug 13, 2021 at 02:47:45PM +0200, Heinrich Schuchardt wrote:
> Avoid a warning
>
> lib/libgcrypt-grub/cipher/rijndael.c:352:21: warning:
> comparison of integer expressions of different signedness:
> ‘int’ and ‘unsigned int’ [-Wsign-compare]
> 352 | for (i = 0; i < keylen; i++)
> |
>
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
One nit below. Otherwise: Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
> ---
> grub-core/lib/libgcrypt/cipher/rijndael.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/grub-core/lib/libgcrypt/cipher/rijndael.c
> b/grub-core/lib/libgcrypt/cipher/rijndael.c
> index 9d884c9d3..acb6ca66e 100644
> --- a/grub-core/lib/libgcrypt/cipher/rijndael.c
> +++ b/grub-core/lib/libgcrypt/cipher/rijndael.c
> @@ -181,7 +181,8 @@ do_setkey (RIJNDAEL_context *ctx, const byte *key, const
> unsigned keylen)
> static int initialized = 0;
> static const char *selftest_failed=0;
> int rounds;
> - int i,j, r, t, rconpointer = 0;
> + unsigned i;
s/unsigned/unsigned int/
I will fix it before committing.
> + int j, r, t, rconpointer = 0;
> int KC;
> union
> {
Daniel