Skip to content

Commit

Permalink
fix compile warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ryancdotorg committed Nov 22, 2020
1 parent ddea113 commit 7230f82
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions algo/keccak.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ keccakf1600_theta(secret uint64_t A[25])
unsigned y;

C0 = C1 = C2 = C3 = C4 = 0;
#pragma GCC diagnostic ignored "-pedantic"
#pragma GCC diagnostic ignored "-Wpedantic"
FOR5(y, {
C0 ^= A[0 + 5*y];
C1 ^= A[1 + 5*y];
Expand Down Expand Up @@ -115,7 +115,7 @@ keccakf1600_chi(secret uint64_t A[25])
secret uint64_t B0, B1, B2, B3, B4;
unsigned y;

#pragma GCC diagnostic ignored "-pedantic"
#pragma GCC diagnostic ignored "-Wpedantic"
FOR5(y, {
B0 = A[0 + 5*y];
B1 = A[1 + 5*y];
Expand Down
1 change: 0 additions & 1 deletion blfchk.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ int main(int argc, char **argv) {
hash160_t hash;
char *line = NULL;
size_t line_sz = 0;
unsigned char buf[128];
unsigned char *bloom, *bloomfile, *hashfile;
FILE *ifile = stdin, *ofile = stdout, *hfile = NULL;
mmapf_ctx bloom_mmapf;
Expand Down
2 changes: 2 additions & 0 deletions bloom.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#define BH19(N) (N[4]<<24|N[0]>> 8)

void bloom_set_hash160(unsigned char *, uint32_t *);
#pragma GCC diagnostic ignored "-Wunused-function"
static unsigned int bloom_chk_hash160(unsigned char *bloom, uint32_t *h) {
unsigned int t;
t = BH00(h); if (BLOOM_GET_BIT(t) == 0) { return 0; }
Expand All @@ -59,6 +60,7 @@ static unsigned int bloom_chk_hash160(unsigned char *bloom, uint32_t *h) {
t = BH19(h); if (BLOOM_GET_BIT(t) == 0) { return 0; }
return 1;
}
#pragma GCC diagnostic pop

//#define bloom_new() malloc(536870912)
//unsigned char * bloom_load(unsigned char *);
Expand Down
5 changes: 5 additions & 0 deletions ec_pubkey_fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
#include "secp256k1/src/ecmult.h"
#include "secp256k1/src/eckey_impl.h"

void secp256k1_ecmult(const secp256k1_ecmult_context_t *ctx, secp256k1_gej_t *r, const secp256k1_gej_t *a, const secp256k1_scalar_t *na, const secp256k1_scalar_t *ng) {
fprintf(stderr, "there is no secp256k1_ecmult %p %p %p %p %p\n", (void*)ctx, (void*)r, (void*)a, (void*)na, (void*)ng);
abort();
}

static int secp256k1_eckey_pubkey_parse(secp256k1_ge_t *elem, const unsigned char *pub, int size);

#include "mmapf.h"
Expand Down

0 comments on commit 7230f82

Please sign in to comment.