aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2019-02-03 06:09:53 -0500
committerPaul Duncan <pabs@pablotron.org>2019-02-03 06:09:53 -0500
commit68a4d7a514578f1360559c84ac08e3a1e2719826 (patch)
treee57f6b67cd0e894f4d9dd37e786f440c6fdbdec5
parente27b55fb0d9716f53989e75247a807397a60c9ef (diff)
downloadkmeans-68a4d7a514578f1360559c84ac08e3a1e2719826.tar.bz2
kmeans-68a4d7a514578f1360559c84ac08e3a1e2719826.zip
add -Werror, fix clang warning
-rw-r--r--Makefile2
-rw-r--r--main.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index d23f364..b3ee253 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
APP=km-test
-CFLAGS=-W -Wall -Wextra -pedantic -std=c11 -O2
+CFLAGS=-W -Wall -Wextra -Werror -pedantic -std=c11 -O2
OBJS=km-set.o km-draw.o km-load.o km-find.o km-rand.o km-solve.o main.o
LIBS=-lm
diff --git a/main.c b/main.c
index e81475d..ec62022 100644
--- a/main.c
+++ b/main.c
@@ -67,7 +67,7 @@ load_on_error(
void * const cb_data
) {
UNUSED(cb_data);
- die(err);
+ die("load failed: %s", err);
}
static const km_load_cbs_t