qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer


From: Laurent Vivier
Subject: Re: [PATCH 3/3] crypto: Redundant type conversion for AES_KEY pointer
Date: Mon, 4 May 2020 14:36:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

Le 03/04/2020 à 10:47, Laurent Vivier a écrit :
> Le 25/03/2020 à 10:21, Chen Qun a écrit :
>> Fix: eaec903c5b8
>>
>> Reported-by: Euler Robot <address@hidden>
>> Signed-off-by: Chen Qun <address@hidden>
>> ---
>> Cc: "Daniel P. Berrangé" <address@hidden>
>> ---
>>  crypto/cipher-builtin.c | 6 ++----
>>  1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/crypto/cipher-builtin.c b/crypto/cipher-builtin.c
>> index bf8413e71a..99d6280a16 100644
>> --- a/crypto/cipher-builtin.c
>> +++ b/crypto/cipher-builtin.c
>> @@ -133,8 +133,7 @@ static void qcrypto_cipher_aes_xts_encrypt(const void 
>> *ctx,
>>  {
>>      const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>  
>> -    qcrypto_cipher_aes_ecb_encrypt((AES_KEY *)&aesctx->enc,
>> -                                   src, dst, length);
>> +    qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
>>  }
>>  
>>  
>> @@ -145,8 +144,7 @@ static void qcrypto_cipher_aes_xts_decrypt(const void 
>> *ctx,
>>  {
>>      const QCryptoCipherBuiltinAESContext *aesctx = ctx;
>>  
>> -    qcrypto_cipher_aes_ecb_decrypt((AES_KEY *)&aesctx->dec,
>> -                                   src, dst, length);
>> +    qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
>>  }
>>  
>>  
>>
> 
> Applied to my trivial-patches-for-5.1 branch.

Removed from the queue because of build errors:

https://travis-ci.com/github/vivier/qemu/jobs/327261040

In file included from /home/travis/build/vivier/qemu/crypto/cipher.c:157:0:
1251/home/travis/build/vivier/qemu/crypto/cipher-builtin.c: In function
‘qcrypto_cipher_aes_xts_encrypt’:
1252/home/travis/build/vivier/qemu/crypto/cipher-builtin.c:136:36:
error: passing argument 1 of ‘qcrypto_cipher_aes_ecb_encrypt’ discards
‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
1253     qcrypto_cipher_aes_ecb_encrypt(&aesctx->enc, src, dst, length);
1254                                    ^
1255/home/travis/build/vivier/qemu/crypto/cipher-builtin.c:77:13: note:
expected ‘AES_KEY * {aka struct aes_key_st *}’ but argument is of type
‘const AES_KEY * {aka const struct aes_key_st *}’
1256 static void qcrypto_cipher_aes_ecb_encrypt(AES_KEY *key,
1257             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1258/home/travis/build/vivier/qemu/crypto/cipher-builtin.c: In function
‘qcrypto_cipher_aes_xts_decrypt’:
1259/home/travis/build/vivier/qemu/crypto/cipher-builtin.c:147:36:
error: passing argument 1 of ‘qcrypto_cipher_aes_ecb_decrypt’ discards
‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
1260     qcrypto_cipher_aes_ecb_decrypt(&aesctx->dec, src, dst, length);
1261                                    ^
1262/home/travis/build/vivier/qemu/crypto/cipher-builtin.c:103:13: note:
expected ‘AES_KEY * {aka struct aes_key_st *}’ but argument is of type
‘const AES_KEY * {aka const struct aes_key_st *}’
1263 static void qcrypto_cipher_aes_ecb_decrypt(AES_KEY *key,
1264             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1265cc1: all warnings being treated as errors
1266/home/travis/build/vivier/qemu/rules.mak:69: recipe for target
'crypto/cipher.o' failed
1267make: *** [crypto/cipher.o] Error 1
1268make: *** Waiting for unfinished jobs....



reply via email to

[Prev in Thread] Current Thread [Next in Thread]