From 68ff7a6282b42491150bd01adc8134cf7f931d8e Mon Sep 17 00:00:00 2001 From: William Casarin Date: Thu, 14 Apr 2022 08:17:10 -0700 Subject: [PATCH] cflags Signed-off-by: William Casarin --- Makefile | 5 +++-- nostril.c | 2 -- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 9ba6906..3a8598a 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ +CFLAGS = -Wall -O2 OBJS = sha256.o nostril.o HEADERS = hex.h random.h config.h sha256.h @@ -6,10 +7,10 @@ all: nostril %.o: %.c config.h @echo "cc $<" - @$(CC) -c $< -o $@ + @$(CC) $(CFLAGS) -c $< -o $@ nostril: $(HEADERS) $(OBJS) - $(CC) $(OBJS) -lsecp256k1 -o $@ + $(CC) $(CFLAGS) $(OBJS) -lsecp256k1 -o $@ config.h: configurator ./configurator > $@ diff --git a/nostril.c b/nostril.c index 53e6af4..8d334ec 100644 --- a/nostril.c +++ b/nostril.c @@ -203,7 +203,6 @@ static int create_key(secp256k1_context *ctx, struct key *key, unsigned char sec static int decode_key(secp256k1_context *ctx, const char *secstr, struct key *key) { unsigned char seckey[32]; - int ok; if (!hex_decode(secstr, strlen(secstr), seckey, 32)) { fprintf(stderr, "could not hex decode secret key\n"); @@ -379,7 +378,6 @@ int main(int argc, const char *argv[]) struct nostr_event ev = {0}; struct key key; secp256k1_context *ctx; - int ok; if (argc < 2) usage();