Fix compiler warnings

master
lucas 2014-05-12 21:12:20 +01:00
parent 043f809b99
commit 905d556c44
6 changed files with 12 additions and 6 deletions

View File

@ -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++)

View File

@ -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();

View File

@ -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;

View File

@ -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"

View File

@ -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,
@ -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,
@ -375,4 +375,4 @@ unsigned char* HEFTY1(const unsigned char *buf, size_t len, unsigned char *diges
HEFTY1_Final(digest, &ctx);
return digest;
}
}

View File

@ -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)