Re: fix for SVN r253208 breaking buildkernel with gcc

看板FB_current作者時間12年前 (2013/07/12 02:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串2/2 (看更多)
On 11.07.2013 18:09, Michael Butler wrote: > On 07/11/13 12:07, Michael Butler wrote: >> Seems gcc is rather fussy about propagating 'const' and fails to compile >> /usr/src/sys/crypto/siphash/siphash.c after SVN r253208. >> >> I believe the attached patch is correct but please review .. >> >> imb > > grr .. missing attachment :-( Thanks, applied your patch in r253214. -- Andre > Index: /usr/src/sys/crypto/siphash/siphash.c > =================================================================== > --- /usr/src/sys/crypto/siphash/siphash.c (revision 253210) > +++ /usr/src/sys/crypto/siphash/siphash.c (working copy) > @@ -119,7 +119,8 @@ > void > SipHash_Update(SIPHASH_CTX *ctx, const void *src, size_t len) > { > - uint64_t m, *p; > + uint64_t m; > + const uint64_t *p; > const uint8_t *s; > size_t rem; > > @@ -144,13 +145,13 @@ > > /* Optimze for 64bit aligned/unaligned access. */ > if (((uintptr_t)s & 0x7) == 0) { > - for (p = (uint64_t *)s; len > 0; len--, p++) { > + for (p = (const uint64_t *)s; len > 0; len--, p++) { > m = le64toh(*p); > ctx->v[3] ^= m; > SipRounds(ctx, 0); > ctx->v[0] ^= m; > } > - s = (uint8_t *)p; > + s = (const uint8_t *)p; > } else { > for (; len > 0; len--, s += 8) { > m = le64dec(s); > > > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > > _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1HtlBVp9 (FB_current)
文章代碼(AID): #1HtlBVp9 (FB_current)