This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: sha512.c 32-bit warning


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]