From owner-freebsd-current@FreeBSD.ORG Thu Jul 11 16:28:00 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 63A2312F for ; Thu, 11 Jul 2013 16:28:00 +0000 (UTC) (envelope-from andre@freebsd.org) Received: from c00l3r.networx.ch (c00l3r.networx.ch [62.48.2.2]) by mx1.freebsd.org (Postfix) with ESMTP id CFD70189D for ; Thu, 11 Jul 2013 16:27:59 +0000 (UTC) Received: (qmail 90040 invoked from network); 11 Jul 2013 17:18:32 -0000 Received: from unknown (HELO [62.48.0.94]) ([62.48.0.94]) (envelope-sender ) by c00l3r.networx.ch (qmail-ldap-1.03) with SMTP for ; 11 Jul 2013 17:18:32 -0000 Message-ID: <51DEDCFF.4080700@freebsd.org> Date: Thu, 11 Jul 2013 18:27:43 +0200 From: Andre Oppermann User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 MIME-Version: 1.0 To: Michael Butler Subject: Re: fix for SVN r253208 breaking buildkernel with gcc References: <51DED84D.30300@protected-networks.net> <51DED8C6.6020807@protected-networks.net> In-Reply-To: <51DED8C6.6020807@protected-networks.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2013 16:28:00 -0000 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" > >