commit 68ff7a6282b42491150bd01adc8134cf7f931d8e
parent 98b712700b94573bb3c4bbae87c145f0e3aa840b
Author: William Casarin <jb55@jb55.com>
Date: Thu, 14 Apr 2022 08:17:10 -0700
cflags
Signed-off-by: William Casarin <jb55@jb55.com>
Diffstat:
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git 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
@@ -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();