Skip to content

Commit 905d556

Browse files
committed
Fix compiler warnings
1 parent 043f809 commit 905d556

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

crypto/c_groestl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static void OutputTransformation(hashState *ctx) {
204204

205205
/* initialise context */
206206
static void Init(hashState* ctx) {
207-
int i = 0;
207+
uint32_t i = 0;
208208
/* allocate memory for state and data buffer */
209209

210210
for(;i<(SIZE512/sizeof(uint32_t));i++)

cryptonight.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ void cryptonight_hash(const char* input, char* output, uint32_t len) {
111111
uint8_t aes_key[AES_KEY_SIZE];
112112
OAES_CTX* aes_ctx;
113113

114-
hash_process(&state.hs, input, len);
114+
hash_process(&state.hs, (const uint8_t*) input, len);
115115
memcpy(text, state.init, INIT_SIZE_BYTE);
116116
memcpy(aes_key, state.hs.b, AES_KEY_SIZE);
117117
aes_ctx = oaes_alloc();

hefty1.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void hefty1_hash(const char* input, char* output, uint32_t len)
4646

4747
memset(output, 0, 32);
4848

49-
char* hash[4] = { &hash32_2, &hash64_3, &hash64_4, &hash64_5 };
49+
char* hash[4] = { hash32_2, hash64_3, hash64_4, hash64_5 };
5050

5151
uint32_t i;
5252
uint32_t j;

qubit.c

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#include "qubit.h"
22

3+
#include <string.h>
4+
#include <stdlib.h>
5+
36
#include "sha3/sph_cubehash.h"
47
#include "sha3/sph_luffa.h"
58
#include "sha3/sph_shavite.h"

sha3/sph_hefty1.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
} \
6363

6464
/* Nothing up my sleeve constants */
65-
const static uint32_t K[64] = {
65+
static const uint32_t K[64] = {
6666
0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL,
6767
0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL,
6868
0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL,
@@ -82,7 +82,7 @@ const static uint32_t K[64] = {
8282
};
8383

8484
/* Initial hash values */
85-
const static uint32_t H[HEFTY1_STATE_WORDS] = {
85+
static const uint32_t H[HEFTY1_STATE_WORDS] = {
8686
0x6a09e667UL,
8787
0xbb67ae85UL,
8888
0x3c6ef372UL,
@@ -375,4 +375,4 @@ unsigned char* HEFTY1(const unsigned char *buf, size_t len, unsigned char *diges
375375
HEFTY1_Final(digest, &ctx);
376376

377377
return digest;
378-
}
378+
}

shavite3.c

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#include "shavite3.h"
22

3+
#include <string.h>
4+
#include <stdlib.h>
5+
36
#include "sha3/sph_shavite.h"
47

58
void shavite3_hash(const char* input, char* output, uint32_t len)

0 commit comments

Comments
 (0)