When I compile libssh 7.5 with the VS2015 compiler I get the following two warnings:

fe25519.c(92):
warning C4146: unary minus operator applied to unsigned type, result still unsigned

fe25519.c(145): warning C4146: unary minus operator applied to unsigned type, result still unsigned

The two lines of code are:


m = -m;

and

mask = -mask;

where both m and mask are defined as crypto_uint32. What is the intended result of apply a unary minus operator to the unsigned types?

m = (uint32_t) ( -(int32_t)m);


Regards,

George M. Garner Jr.



Reply via email to