From 5d6a489b98bffc39f80c8b22435fcd49c4ca58c5 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Sat, 23 Aug 2014 21:49:05 +0200 Subject: [PATCH] scrypt: fix implicit function declaration --- scrypt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scrypt.c b/scrypt.c index 2ff2902..f0795a3 100644 --- a/scrypt.c +++ b/scrypt.c @@ -506,7 +506,7 @@ static inline void scrypt_core(uint32_t *X, uint32_t *V) unsigned char *scrypt_buffer_alloc() { - return malloc(SCRYPT_BUFFER_SIZE); + return (unsigned char *)malloc(SCRYPT_BUFFER_SIZE); } static void scrypt_1024_1_1_256(const uint32_t *input, uint32_t *output, @@ -719,22 +719,22 @@ int scanhash_scrypt(int thr_id, uint32_t *pdata, for (i = 0; i < throughput; i++) data[i * 20 + 19] = ++n; -#if defined(HAVE_SHA256_4WAY) +#if HAVE_SHA256_4WAY if (throughput == 4) scrypt_1024_1_1_256_4way(data, hash, midstate, scratchbuf); else #endif -#if defined(HAVE_SCRYPT_3WAY) && defined(HAVE_SHA256_4WAY) +#if HAVE_SCRYPT_3WAY && HAVE_SHA256_4WAY if (throughput == 12) scrypt_1024_1_1_256_12way(data, hash, midstate, scratchbuf); else #endif -#if defined(HAVE_SCRYPT_6WAY) +#if HAVE_SCRYPT_6WAY if (throughput == 24) scrypt_1024_1_1_256_24way(data, hash, midstate, scratchbuf); else #endif -#if defined(HAVE_SCRYPT_3WAY) +#if HAVE_SCRYPT_3WAY if (throughput == 3) scrypt_1024_1_1_256_3way(data, hash, midstate, scratchbuf); else