libtom / libtomcrypt

LibTomCrypt is a fairly comprehensive, modular and portable cryptographic toolkit that provides developers with a vast array of well known published block ciphers, one-way hash functions, chaining modes, pseudo-random number generators, public key cryptography and a plethora of other routines.
https://www.libtom.net
Other
1.51k stars 449 forks source link

fix XCALLOC() against GCC 14 -Wcalloc-transposed-args #647

Closed etienne-lms closed 1 week ago

etienne-lms commented 1 week ago

Fix use of XCALLOC() macro against GCC 14 directive -Wcalloc-transposed-args that makes GCC to complain with an warning/error trace message like the below when 1st argument is given by sizeof().

warning: 'calloc' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]

No functional changes.

We experienced this issue building OP-TEE OS (https://github.com/OP-TE/optee_os.git, that host libtomcrypt library) with latest Yocto Styhead that uses GCC 14.1.

Checklist