Skip to content

Commit

Permalink
fix static warnings in cpu algos
Browse files Browse the repository at this point in the history
  • Loading branch information
tpruvot committed Jan 3, 2017
1 parent 443fa27 commit 8039ea9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 23 deletions.
12 changes: 4 additions & 8 deletions algorithm/bitblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ typedef struct {

static Xhash_context_holder base_contexts;


void init_Bhash_contexts()
static void init_Bhash_contexts()
{
sph_blake512_init(&base_contexts.blake1);
sph_bmw512_init(&base_contexts.bmw1);
Expand All @@ -96,7 +95,7 @@ void init_Bhash_contexts()
* Encode a length len/4 vector of (uint32_t) into a length len vector of
* (unsigned char) in big-endian form. Assumes len is a multiple of 4.
*/
static inline void
inline void
be32enc_vect(uint32_t *dst, const uint32_t *src, uint32_t len)
{
uint32_t i;
Expand All @@ -106,10 +105,7 @@ be32enc_vect(uint32_t *dst, const uint32_t *src, uint32_t len)
}


#ifdef __APPLE_CC__
static
#endif
inline void bitblockhash(void *state, const void *input)
static void bitblockhash(void *state, const void *input)
{
init_Bhash_contexts();

Expand Down Expand Up @@ -241,4 +237,4 @@ bool scanhash_bitblock(struct thr_info *thr, const unsigned char __maybe_unused
}

return ret;
}
}
11 changes: 3 additions & 8 deletions algorithm/marucoin.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ typedef struct {

static Xhash_context_holder base_contexts;


void init_Mhash_contexts()
static void init_Mhash_contexts()
{
sph_blake512_init(&base_contexts.blake1);
sph_bmw512_init(&base_contexts.bmw1);
Expand All @@ -90,7 +89,7 @@ void init_Mhash_contexts()
* Encode a length len/4 vector of (uint32_t) into a length len vector of
* (unsigned char) in big-endian form. Assumes len is a multiple of 4.
*/
static inline void
inline void
be32enc_vect(uint32_t *dst, const uint32_t *src, uint32_t len)
{
uint32_t i;
Expand All @@ -99,11 +98,7 @@ be32enc_vect(uint32_t *dst, const uint32_t *src, uint32_t len)
dst[i] = htobe32(src[i]);
}


#ifdef __APPLE_CC__
static
#endif
inline void maruhash(void *state, const void *input)
static void maruhash(void *state, const void *input)
{
init_Mhash_contexts();

Expand Down
4 changes: 2 additions & 2 deletions algorithm/pluck.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ void sha256_hash512(unsigned char *hash, const unsigned char *data)
be32enc((uint32_t *)hash + i, S[i]);
}

inline void pluckrehash(void *state, const void *input)
static void pluckrehash(void *state, const void *input)
{

int i,j;
Expand Down Expand Up @@ -464,4 +464,4 @@ bool scanhash_pluck(struct thr_info *thr, const unsigned char __maybe_unused *pm
}

return ret;
}
}
7 changes: 2 additions & 5 deletions algorithm/talkcoin.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void init_Nhash_contexts()
* Encode a length len/4 vector of (uint32_t) into a length len vector of
* (unsigned char) in big-endian form. Assumes len is a multiple of 4.
*/
static inline void
inline void
be32enc_vect(uint32_t *dst, const uint32_t *src, uint32_t len)
{
uint32_t i;
Expand All @@ -72,10 +72,7 @@ be32enc_vect(uint32_t *dst, const uint32_t *src, uint32_t len)
}


#ifdef __APPLE_CC__
static
#endif
inline void talkhash(void *state, const void *input)
static void talkhash(void *state, const void *input)
{
init_Nhash_contexts();

Expand Down

0 comments on commit 8039ea9

Please sign in to comment.