sha512.c 32-bit warning

Andreas Jaeger aj@suse.com
Wed Aug 15 20:47:00 GMT 2012


On 08/15/2012 10:38 PM, Roland McGrath wrote:
> sha512.c now gets a warning when compiled on any 32-bit configuration.
> Can you fix that?

Indeed - warning is:
sha512.c: In function ‘sha512_process_block’:
sha512.c:128:3: warning: right shift count >= width of type [enabled by 
default]

for this line:
   ctx->total[TOTAL128_high] += ((len >> 63 >> 1)
				+ (ctx->total[TOTAL128_low] < lolen));

and total is uint64_t.

I'll look the next days into it,

Andreas
-- 
  Andreas Jaeger aj@{suse.com,opensuse.org} Twitter/Identica: jaegerandi
   SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
    GF: Jeff Hawn,Jennifer Guild,Felix Imendörffer,HRB16746 (AG Nürnberg)
     GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126



More information about the Libc-alpha mailing list