[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: compile errors
[Thread Prev] | [Thread Next]
- Subject: Re: compile errors
- From: Aris Adamantiadis <aris@xxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Sat, 1 Apr 2017 18:05:54 +0200
- To: libssh@xxxxxxxxxx
Hi George, Not our code but part of ed25519 signature scheme. I guess the goal is to get two's complement to m, i.e. m = (~m) -1; It's crypto code so I wouldn't dare touching this unless we're certain it's issuing wrong code or the result is undefined. Aris On 1/04/17 18:00, George M. Garner Jr. wrote: > 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. > > >
Re: compile errors | "George M. Garner Jr." <ggarner_online@xxxxxxxxxxxxxxxxx> |