This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: sha512.c 32-bit warning
- From: Andreas Jaeger <aj at suse dot com>
- To: Roland McGrath <roland at hack dot frob dot com>, eggert at cs dot ucla dot edu
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 15 Aug 2012 22:47:35 +0200
- Subject: Re: sha512.c 32-bit warning
- References: <20120815203840.CE79E2C105@topped-with-meat.com>
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