diff --git a/Makefile.inc b/Makefile.inc index f0ebc00..69de079 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -9,7 +9,7 @@ OBJS = $(SRCS:.c=.o) AR=ar RANLIB=ranlib -CFLAGS += -g -D_POSIX_C_SOURCE=200809L -std=c99 -pipe -Wall -Wno-unused-function +CFLAGS += -g -D_POSIX_C_SOURCE=200809L -std=c99 -pipe -Wall -Wno-unused-function -Wno-missing-braces LDFLAGS += -g -lpthread -lrt -lm -include $(TROOT)/config.mak diff --git a/src/math/lrint.c b/src/math/lrint.c index 22328d1..6f03c6b 100644 --- a/src/math/lrint.c +++ b/src/math/lrint.c @@ -226,7 +226,7 @@ FE_TOWARDZERO, -0x1.ffffffffp+31, 0, FE_INVALID, void test_lrint() { - int f, i, j; + int f, i; long n; for (i = 0; i < sizeof t/sizeof *t; i++) { diff --git a/src/process/spawn.c b/src/process/spawn.c index 18b8e27..bc1dc12 100644 --- a/src/process/spawn.c +++ b/src/process/spawn.c @@ -21,7 +21,6 @@ void test_spawn(void) { int p[2]; pid_t pid; int status; - posix_spawnattr_t attr; posix_spawn_file_actions_t fa; TEST_E(!pipe(p)); diff --git a/src/stdio/snprintf.c b/src/stdio/snprintf.c index f8768a8..ce92c1a 100644 --- a/src/stdio/snprintf.c +++ b/src/stdio/snprintf.c @@ -119,7 +119,7 @@ static const struct { void test_snprintf(void) { int i, j, k; - char b[2000], *s; + char b[2000]; TEST(i, snprintf(0, 0, "%d", 123456), 6, "length returned %d != %d"); TEST(i, snprintf(0, 0, "%.4s", "hello"), 4, "length returned %d != %d"); diff --git a/src/stdio/swprintf.c b/src/stdio/swprintf.c index f05b150..14c53d6 100644 --- a/src/stdio/swprintf.c +++ b/src/stdio/swprintf.c @@ -96,7 +96,7 @@ static const struct { void test_swprintf(void) { int i, j; - wchar_t b[500], *s; + wchar_t b[500]; setlocale(LC_CTYPE, "en_US.UTF-8") || setlocale(LC_CTYPE, "en_GB.UTF-8") || diff --git a/src/thread/pthread.c b/src/thread/pthread.c index 3cc6b84..bb2f253 100644 --- a/src/thread/pthread.c +++ b/src/thread/pthread.c @@ -141,9 +141,7 @@ void test_pthread(void) int foo[4], bar[2]; pthread_barrier_t barrier2; pthread_mutexattr_t mtx_a; - pthread_mutex_t *sh_mtx; sem_t sem1; - int fd; pthread_mutex_t mtx; pthread_cond_t cond;