You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ #19
problem: building pycryptopp gives these warnings:
src-ed25519/supercop-ref/ed25519.c:125:14: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wsign-compare-Wsign-compare8;;]
125 | for(i=0;i<smlen-64;i++)
| ^
src-ed25519/supercop-ref/ed25519.c:131:14: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wsign-compare-Wsign-compare8;;]
131 | for(i=0;i<smlen-64;i++)
| ^
src-ed25519/supercop-ref/sha512-hash.c:40:16: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long long unsigned int’ [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wsign-compare-Wsign-compare8;;]
40 | for (i = 0;i < inlen;++i) padded[i] = in[i];
| ^
the variables smlen and inlen have type unsigned long long, so this should be trivial to fix with
sed -i 's/^ int i, ret;$/ unsigned long long i, ret;/' src-ed25519/supercop-ref/ed25519.c
sed -i 's/^ int i;$/ unsigned long long i;/' src-ed25519/supercop-ref/sha512-hash.c
Activity