Skip to content

Commit

Permalink
Fix compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasjones committed May 12, 2014
1 parent 043f809 commit 905d556
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crypto/c_groestl.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static void OutputTransformation(hashState *ctx) {

/* initialise context */
static void Init(hashState* ctx) {
int i = 0;
uint32_t i = 0;
/* allocate memory for state and data buffer */

for(;i<(SIZE512/sizeof(uint32_t));i++)
Expand Down
2 changes: 1 addition & 1 deletion cryptonight.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ void cryptonight_hash(const char* input, char* output, uint32_t len) {
uint8_t aes_key[AES_KEY_SIZE];
OAES_CTX* aes_ctx;

hash_process(&state.hs, input, len);
hash_process(&state.hs, (const uint8_t*) input, len);
memcpy(text, state.init, INIT_SIZE_BYTE);
memcpy(aes_key, state.hs.b, AES_KEY_SIZE);
aes_ctx = oaes_alloc();
Expand Down
2 changes: 1 addition & 1 deletion hefty1.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void hefty1_hash(const char* input, char* output, uint32_t len)

memset(output, 0, 32);

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

uint32_t i;
uint32_t j;
Expand Down
3 changes: 3 additions & 0 deletions qubit.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "qubit.h"

#include <string.h>
#include <stdlib.h>

#include "sha3/sph_cubehash.h"
#include "sha3/sph_luffa.h"
#include "sha3/sph_shavite.h"
Expand Down
6 changes: 3 additions & 3 deletions sha3/sph_hefty1.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
} \

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

/* Initial hash values */
const static uint32_t H[HEFTY1_STATE_WORDS] = {
static const uint32_t H[HEFTY1_STATE_WORDS] = {
0x6a09e667UL,
0xbb67ae85UL,
0x3c6ef372UL,
Expand Down Expand Up @@ -375,4 +375,4 @@ unsigned char* HEFTY1(const unsigned char *buf, size_t len, unsigned char *diges
HEFTY1_Final(digest, &ctx);

return digest;
}
}
3 changes: 3 additions & 0 deletions shavite3.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#include "shavite3.h"

#include <string.h>
#include <stdlib.h>

#include "sha3/sph_shavite.h"

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

0 comments on commit 905d556

Please sign in to comment.