From b5f3cb39178217d6ea95b2aebcfb95b7d2dd42f5 Mon Sep 17 00:00:00 2001 From: Evan Jones Date: Sat, 30 Sep 2023 14:49:23 -0400 Subject: [PATCH] Makefile: Use -Wall for compiling tests CFLAGS uses -Wall along with some -Wno-* options. However, tests are compiled using TEST_CFLAGS, so they did not use these options. Compile tests with -Wall. This also reorders the TEST_CFLAGS options to match the CFLAGS options above for easier comparison. test/concurrency: Fix unused arg warning from -Wall. Sort includes. --- Makefile | 2 +- test/concurrency.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index c31b5198..5b266c8c 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ override CFLAGS += -g -I. -I./vendor -I./src/postgres/include -Wall -Wno-unused- override PG_CONFIGURE_FLAGS += -q --without-readline --without-zlib -override TEST_CFLAGS += -I. -I./vendor -g +override TEST_CFLAGS += -g -I. -I./vendor -Wall override TEST_LDFLAGS += -pthread CFLAGS_OPT_LEVEL = -O3 diff --git a/test/concurrency.c b/test/concurrency.c index 3d7425d3..a54ae429 100644 --- a/test/concurrency.c +++ b/test/concurrency.c @@ -1,10 +1,11 @@ #include +#include +#include +#include #include #include #include -#include -#include #include "parse_tests.c" @@ -38,7 +39,8 @@ int main() { return 0; } -void* test_runner(void* ptr) { +void* test_runner(void* unused_pthread_arg) { + assert(unused_pthread_arg == NULL); size_t i; for (i = 0; i < testsLength; i += 2) {