Place static keyword before const in function definitions Warned-by: gcc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
diff --git a/src/sha2.c b/src/sha2.c
index dbb6100..15c4fd3 100644
--- a/src/sha2.c
+++ b/src/sha2.c
@@ -140,7 +140,7 @@
/*** SHA-XYZ INITIAL HASH VALUES AND CONSTANTS ************************/
/* Hash constant words K for SHA-256: */
-const static uint32_t K256[64] = {
+static const uint32_t K256[64] = {
0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
@@ -160,7 +160,7 @@ const static uint32_t K256[64] = {
};
/* Initial hash value H for SHA-256: */
-const static uint32_t sha256_initial_hash_value[8] = {
+static const uint32_t sha256_initial_hash_value[8] = {
0x6a09e667UL,
0xbb67ae85UL,
0x3c6ef372UL,
@@ -173,7 +173,7 @@ const static uint32_t sha256_initial_hash_value[8] = {
#ifndef SHA256_ONLY
/* Hash constant words K for SHA-384 and SHA-512: */
-const static uint64_t K512[80] = {
+static const uint64_t K512[80] = {
0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL,
0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL,
0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL,
@@ -217,7 +217,7 @@ const static uint64_t K512[80] = {
};
/* Initial hash value H for SHA-384 */
-const static uint64_t sha384_initial_hash_value[8] = {
+static const uint64_t sha384_initial_hash_value[8] = {
0xcbbb9d5dc1059ed8ULL,
0x629a292a367cd507ULL,
0x9159015a3070dd17ULL,
@@ -229,7 +229,7 @@ const static uint64_t sha384_initial_hash_value[8] = {
};
/* Initial hash value H for SHA-512 */
-const static uint64_t sha512_initial_hash_value[8] = {
+static const uint64_t sha512_initial_hash_value[8] = {
0x6a09e667f3bcc908ULL,
0xbb67ae8584caa73bULL,
0x3c6ef372fe94f82bULL,