From b14ee3ed3956c9a70bdfcd7b06287c65bfdbf379 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 6 Mar 2018 21:23:36 -0700 Subject: [PATCH] Fix build, add Wall --- tests/Makefile | 4 ++-- tests/alloc.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Makefile b/tests/Makefile index 77f7345de4..41dc224061 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -20,7 +20,7 @@ clean: rm -f $(BINS) *.out run: $(BINS) - for bin in $(BINS); do echo "\\033[1m$${bin}\\033[0m"; ./$${bin} test args; done + for bin in $(BINS); do echo "# $${bin} #"; "./$${bin}" test args; done GCCHEAD=\ -nostdinc \ @@ -36,4 +36,4 @@ GCCTAIL=\ ../openlibm/libopenlibm.a %: %.c - gcc -fno-stack-protector $(GCCHEAD) $< $(GCCTAIL) -o $@ + gcc -fno-stack-protector -Wall $(GCCHEAD) "$<" $(GCCTAIL) -o "$@" diff --git a/tests/alloc.c b/tests/alloc.c index a9fee5ee1b..30e59da92a 100644 --- a/tests/alloc.c +++ b/tests/alloc.c @@ -12,7 +12,7 @@ int main(int argc, char ** argv) { char * ptrc = (char *)calloc(256,1); printf("calloc %p\n", ptrc); - for(int i = 0; i < 256; i++) { + for(i = 0; i < 256; i++) { ptrc[i] = (char)i; } free(ptrc);