BelledonneCommunications / bctoolbox

Linphone.org mirror for bctoolbox (git://git.linphone.org/bctoolbox.git)
http://linphone.org
GNU General Public License v3.0
25 stars 33 forks source link

bctoolbox warnings with GCC11 #13

Open paolostivanin opened 3 years ago

paolostivanin commented 3 years ago

When building bctoolbox with GCC11, the following warnings are thrown:

[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:1765:43: error: argument 1 of type 'const uint8_t[16]' {aka 'const unsigned char[16]'} with mismatched bound [-Werror=array-parameter=]
[   22s]  1765 | void bctbx_aes128CfbEncrypt(const uint8_t key[16],
[   22s]       |                             ~~~~~~~~~~~~~~^~~~~~~
[   22s] In file included from /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:48:
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/include/bctoolbox/crypto.h:1070:57: note: previously declared as 'const uint8_t *' {aka 'const unsigned char *'}
[   22s]  1070 | BCTBX_PUBLIC void bctbx_aes128CfbEncrypt(const uint8_t *key,
[   22s]       |                                          ~~~~~~~~~~~~~~~^~~
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:1766:31: error: argument 2 of type 'const uint8_t[16]' {aka 'const unsigned char[16]'} with mismatched bound [-Werror=array-parameter=]
[   22s]  1766 |                 const uint8_t IV[16],
[   22s]       |                 ~~~~~~~~~~~~~~^~~~~~
[   22s] In file included from /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:48:
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/include/bctoolbox/crypto.h:1071:32: note: previously declared as 'const uint8_t *' {aka 'const unsigned char *'}
[   22s]  1071 |                 const uint8_t *IV,
[   22s]       |                 ~~~~~~~~~~~~~~~^~
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:1797:43: error: argument 1 of type 'const uint8_t[16]' {aka 'const unsigned char[16]'} with mismatched bound [-Werror=array-parameter=]
[   22s]  1797 | void bctbx_aes128CfbDecrypt(const uint8_t key[16],
[   22s]       |                             ~~~~~~~~~~~~~~^~~~~~~
[   22s] In file included from /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:48:
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/include/bctoolbox/crypto.h:1087:57: note: previously declared as 'const uint8_t *' {aka 'const unsigned char *'}
[   22s]  1087 | BCTBX_PUBLIC void bctbx_aes128CfbDecrypt(const uint8_t *key,
[   22s]       |                                          ~~~~~~~~~~~~~~~^~~
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:1798:31: error: argument 2 of type 'const uint8_t[16]' {aka 'const unsigned char[16]'} with mismatched bound [-Werror=array-parameter=]
[   22s]  1798 |                 const uint8_t IV[16],
[   22s]       |                 ~~~~~~~~~~~~~~^~~~~~
[   22s] In file included from /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:48:
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/include/bctoolbox/crypto.h:1088:32: note: previously declared as 'const uint8_t *' {aka 'const unsigned char *'}
[   22s]  1088 |                 const uint8_t *IV,
[   22s]       |                 ~~~~~~~~~~~~~~~^~
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:1829:43: error: argument 1 of type 'const uint8_t[32]' {aka 'const unsigned char[32]'} with mismatched bound [-Werror=array-parameter=]
[   22s]  1829 | void bctbx_aes256CfbEncrypt(const uint8_t key[32],
[   22s]       |                             ~~~~~~~~~~~~~~^~~~~~~
[   22s] In file included from /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:48:
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/include/bctoolbox/crypto.h:1104:57: note: previously declared as 'const uint8_t *' {aka 'const unsigned char *'}
[   22s]  1104 | BCTBX_PUBLIC void bctbx_aes256CfbEncrypt(const uint8_t *key,
[   22s]       |                                          ~~~~~~~~~~~~~~~^~~
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:1830:31: error: argument 2 of type 'const uint8_t[16]' {aka 'const unsigned char[16]'} with mismatched bound [-Werror=array-parameter=]
[   22s]  1830 |                 const uint8_t IV[16],
[   22s]       |                 ~~~~~~~~~~~~~~^~~~~~
[   22s] In file included from /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:48:
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/include/bctoolbox/crypto.h:1105:32: note: previously declared as 'const uint8_t *' {aka 'const unsigned char *'}
[   22s]  1105 |                 const uint8_t *IV,
[   22s]       |                 ~~~~~~~~~~~~~~~^~
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:1858:43: error: argument 1 of type 'const uint8_t[32]' {aka 'const unsigned char[32]'} with mismatched bound [-Werror=array-parameter=]
[   22s]  1858 | void bctbx_aes256CfbDecrypt(const uint8_t key[32],
[   22s]       |                             ~~~~~~~~~~~~~~^~~~~~~
[   22s] In file included from /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:48:
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/include/bctoolbox/crypto.h:1121:57: note: previously declared as 'const uint8_t *' {aka 'const unsigned char *'}
[   22s]  1121 | BCTBX_PUBLIC void bctbx_aes256CfbDecrypt(const uint8_t *key,
[   22s]       |                                          ~~~~~~~~~~~~~~~^~~
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:1859:31: error: argument 2 of type 'const uint8_t[16]' {aka 'const unsigned char[16]'} with mismatched bound [-Werror=array-parameter=]
[   22s]  1859 |                 const uint8_t IV[16],
[   22s]       |                 ~~~~~~~~~~~~~~^~~~~~
[   22s] In file included from /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/src/crypto/mbedtls.c:48:
[   22s] /home/abuild/rpmbuild/BUILD/bctoolbox-4.4.33/include/bctoolbox/crypto.h:1122:32: note: previously declared as 'const uint8_t *' {aka 'const unsigned char *'}
[   22s]  1122 |                 const uint8_t *IV,
[   22s]       |                 ~~~~~~~~~~~~~~~^~
[   22s] cc1: all warnings being treated as errors
paolostivanin commented 3 years ago

@julonexus @Viish sorry for pinging you directly, but I cannot open an issue on the official gitlab project page, so I have to open it here.