From owner-svn-src-head@FreeBSD.ORG Thu Jul 11 16:27:11 2013 Return-Path: Delivered-To: svn-src-head@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 DD71DF50; Thu, 11 Jul 2013 16:27:11 +0000 (UTC) (envelope-from andre@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D0069188C; Thu, 11 Jul 2013 16:27:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r6BGRB8t037943; Thu, 11 Jul 2013 16:27:11 GMT (envelope-from andre@svn.freebsd.org) Received: (from andre@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r6BGRBUa037942; Thu, 11 Jul 2013 16:27:11 GMT (envelope-from andre@svn.freebsd.org) Message-Id: <201307111627.r6BGRBUa037942@svn.freebsd.org> From: Andre Oppermann Date: Thu, 11 Jul 2013 16:27:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r253214 - head/sys/crypto/siphash X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jul 2013 16:27:11 -0000 Author: andre Date: Thu Jul 11 16:27:11 2013 New Revision: 253214 URL: http://svnweb.freebsd.org/changeset/base/253214 Log: Fix const propagation issues to make GCC happy. Submitted by: Michael Butler Modified: head/sys/crypto/siphash/siphash.c Modified: head/sys/crypto/siphash/siphash.c ============================================================================== --- head/sys/crypto/siphash/siphash.c Thu Jul 11 15:55:57 2013 (r253213) +++ head/sys/crypto/siphash/siphash.c Thu Jul 11 16:27:11 2013 (r253214) @@ -119,7 +119,8 @@ SipBuf(SIPHASH_CTX *ctx, const uint8_t * 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 @@ SipHash_Update(SIPHASH_CTX *ctx, const v /* 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);