[pycrypto] _fastmath.c on 64-bit, compile-time warnings

Thorsten Behrens sbehrens at gmx.li
Fri Dec 24 18:48:24 CST 2010


_fastmath.c gives out some warnings along the lines of "you may lose 
data because you are forcing a 64-bit value into a 32-bit value" when 
compiling pycrypto as a native 64-bit module.

I don't want to get too side-tracked right now - but could someone take 
a look and see whether these warnings are harmless? And even if they are 
harmless, whether the code could be changed to avoid the warnings 
without breaking the code?

src/_fastmath.c(62) : warning C4244: '=' : conversion from 'Py_ssize_t' 
to 'int', possible loss of data
src/_fastmath.c(64) : warning C4244: '=' : conversion from 'Py_ssize_t' 
to 'int', possible loss of data
src/_fastmath.c(88) : warning C4267: 'initializing' : conversion from 
'size_t' to 'int', possible loss of data
src/_fastmath.c(1096) : warning C4267: 'function' : conversion from 
'size_t' to 'unsigned long', possible loss of data
src/_fastmath.c(1177) : warning C4244: '=' : conversion from 
'mp_bitcnt_t' to 'unsigned long', possible loss of data
src/_fastmath.c(1180) : warning C4018: '<' : signed/unsigned mismatch
src/_fastmath.c(1182) : warning C4018: '<' : signed/unsigned mismatch

Thorsten



More information about the pycrypto mailing list