[openssl-dev] [openssl.org #4422] OS X 32-bit PowerPC: blake2b.c:27: warning: integer constant is too large for 'unsigned long' type

Kurt Roeckx kurt at roeckx.be
Sun Mar 13 11:24:06 UTC 2016


On Sun, Mar 13, 2016 at 07:15:52AM -0400, Jeffrey Walton wrote:
> On Sun, Mar 13, 2016 at 6:57 AM, Kurt Roeckx via RT <rt at openssl.org> wrote:
> > On Sun, Mar 13, 2016 at 10:30:54AM +0000, noloader at gmail.com via RT wrote:
> >> crypto/blake2/blake2b.c:27: warning: integer constant is too large for
> >> 'unsigned long' type
> >
> > That's a uint64_t.  Why do you have an "unsigned long" as 64 bit
> > uint64_t?
> >
> 
> Hmmm... Not sure.
> 
> Looking at the declaration:
> 
> static const uint64_t blake2b_IV[8] =
> {
>     0x6a09e667f3bcc908U, 0xbb67ae8584caa73bU,
>     0x3c6ef372fe94f82bU, 0xa54ff53a5f1d36f1U,
>     0x510e527fade682d1U, 0x9b05688c2b3e6c1fU,
>     0x1f83d9abfb41bd6bU, 0x5be0cd19137e2179U
> };
> 
> I've run into this before, but in C++. I think you need ULL, and not
> U. But I don't know if it will adversely affect other compilers and
> platforms.

So I guess where in the situation where "U" is not supported by
some compilers and "ULL" not by others, where both should be
valid.


Kurt



More information about the openssl-dev mailing list