svn commit: r314550 - stable/10/sys/crypto/sha2

Andriy Gapon avg at FreeBSD.org
Thu Mar 2 09:10:41 UTC 2017


Author: avg
Date: Thu Mar  2 09:10:39 2017
New Revision: 314550
URL: https://svnweb.freebsd.org/changeset/base/314550

Log:
  Fix r314332 (MFC of r300903): do not use C99 Static array indices
  
  The proper conditional support for that feature has not been MFC-ed yet
  and GCC is quirky about it.  See r314101.
  
  This is a direct commit.
  
  Reported by:	gjb

Modified:
  stable/10/sys/crypto/sha2/sha512c.c
  stable/10/sys/crypto/sha2/sha512t.h

Modified: stable/10/sys/crypto/sha2/sha512c.c
==============================================================================
--- stable/10/sys/crypto/sha2/sha512c.c	Thu Mar  2 07:55:47 2017	(r314549)
+++ stable/10/sys/crypto/sha2/sha512c.c	Thu Mar  2 09:10:39 2017	(r314550)
@@ -364,7 +364,7 @@ SHA512_224_Update(SHA512_CTX * ctx, cons
 }
 
 void
-SHA512_224_Final(unsigned char digest[static SHA512_224_DIGEST_LENGTH], SHA512_CTX * ctx)
+SHA512_224_Final(unsigned char digest[SHA512_224_DIGEST_LENGTH], SHA512_CTX * ctx)
 {
 
 	/* Add padding */
@@ -403,7 +403,7 @@ SHA512_256_Update(SHA512_CTX * ctx, cons
 }
 
 void
-SHA512_256_Final(unsigned char digest[static SHA512_256_DIGEST_LENGTH], SHA512_CTX * ctx)
+SHA512_256_Final(unsigned char digest[SHA512_256_DIGEST_LENGTH], SHA512_CTX * ctx)
 {
 
 	/* Add padding */

Modified: stable/10/sys/crypto/sha2/sha512t.h
==============================================================================
--- stable/10/sys/crypto/sha2/sha512t.h	Thu Mar  2 07:55:47 2017	(r314549)
+++ stable/10/sys/crypto/sha2/sha512t.h	Thu Mar  2 09:10:39 2017	(r314550)
@@ -103,7 +103,7 @@ __BEGIN_DECLS
 
 void	SHA512_224_Init(SHA512_CTX *);
 void	SHA512_224_Update(SHA512_CTX *, const void *, size_t);
-void	SHA512_224_Final(unsigned char [static SHA512_224_DIGEST_LENGTH], SHA512_CTX *);
+void	SHA512_224_Final(unsigned char [SHA512_224_DIGEST_LENGTH], SHA512_CTX *);
 #ifndef _KERNEL
 char   *SHA512_224_End(SHA512_CTX *, char *);
 char   *SHA512_224_Data(const void *, unsigned int, char *);
@@ -112,7 +112,7 @@ char   *SHA512_224_FileChunk(const char 
 #endif
 void	SHA512_256_Init(SHA512_CTX *);
 void	SHA512_256_Update(SHA512_CTX *, const void *, size_t);
-void	SHA512_256_Final(unsigned char [static SHA512_256_DIGEST_LENGTH], SHA512_CTX *);
+void	SHA512_256_Final(unsigned char [SHA512_256_DIGEST_LENGTH], SHA512_CTX *);
 #ifndef _KERNEL
 char   *SHA512_256_End(SHA512_CTX *, char *);
 char   *SHA512_256_Data(const void *, unsigned int, char *);


More information about the svn-src-all mailing list