diff --git a/src/common/Makefile b/src/common/Makefile index 485daae7f..ec7ed48ea 100644 --- a/src/common/Makefile +++ b/src/common/Makefile @@ -1,5 +1,5 @@ CC = gcc -CFLAGS = -g -Wall -Wno-typedef-redefinition --std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L -fPIC -I. -Ithirdparty -Ithirdparty/ae +CFLAGS = -g -Wall -Wextra -Werror=implicit-function-declaration -Wno-typedef-redefinition -Wno-sign-compare -Wno-unused-parameter -Wno-type-limits -Wno-missing-field-initializers --std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L -fPIC -I. -Ithirdparty -Ithirdparty/ae BUILD = build all: hiredis redis $(BUILD)/libcommon.a diff --git a/src/global_scheduler/Makefile b/src/global_scheduler/Makefile index b98240be2..da45947f1 100644 --- a/src/global_scheduler/Makefile +++ b/src/global_scheduler/Makefile @@ -1,5 +1,5 @@ CC = gcc -CFLAGS = -g -Wall --std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L -I. -I../common -I../common/thirdparty -I../common/state +CFLAGS = -g -Wall -Wextra -Werror=implicit-function-declaration -Wno-sign-compare -Wno-unused-parameter -Wno-type-limits -Wno-missing-field-initializers --std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L -I. -I../common -I../common/thirdparty -I../common/state BUILD = build all: $(BUILD)/global_scheduler diff --git a/src/photon/Makefile b/src/photon/Makefile index 9d7db8eb7..e0334bd27 100644 --- a/src/photon/Makefile +++ b/src/photon/Makefile @@ -1,5 +1,5 @@ CC = gcc -CFLAGS = -g -Wall --std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L -I.. -I../common -I../common/thirdparty -fPIC +CFLAGS = -g -Wall -Wextra -Werror=implicit-function-declaration -Wno-sign-compare -Wno-unused-parameter -Wno-type-limits -Wno-missing-field-initializers --std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L -I.. -I../common -I../common/thirdparty -fPIC BUILD = build all: $(BUILD)/photon_scheduler $(BUILD)/photon_client.a diff --git a/src/plasma/Makefile b/src/plasma/Makefile index 1e33f376c..f0dfe7497 100644 --- a/src/plasma/Makefile +++ b/src/plasma/Makefile @@ -1,5 +1,5 @@ CC = gcc -CFLAGS = -g -Wall --std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L -I. -I../common -I../common/thirdparty +CFLAGS = -g -Wall -Wextra -Werror=implicit-function-declaration -Wno-sign-compare -Wno-unused-parameter -Wno-type-limits -Wno-missing-field-initializers --std=c99 -D_XOPEN_SOURCE=500 -D_POSIX_C_SOURCE=200809L -I. -I../common -I../common/thirdparty TEST_CFLAGS = -DPLASMA_TEST=1 -I. BUILD = build diff --git a/src/plasma/plasma_client.c b/src/plasma/plasma_client.c index c0222a408..22408d5e1 100644 --- a/src/plasma/plasma_client.c +++ b/src/plasma/plasma_client.c @@ -25,6 +25,11 @@ #define NUM_CONNECT_ATTEMPTS 50 #define CONNECT_TIMEOUT 100 +#ifndef _WIN32 +/* This function is actually not declared in standard POSIX, so declare it. */ +extern int usleep(useconds_t usec); +#endif + typedef struct { /** Key that uniquely identifies the memory mapped file. In practice, we * take the numerical value of the file descriptor in the object store. */ diff --git a/src/plasma/test/manager_tests.c b/src/plasma/test/manager_tests.c index f33e6d7b1..3da35a9c0 100644 --- a/src/plasma/test/manager_tests.c +++ b/src/plasma/test/manager_tests.c @@ -15,6 +15,11 @@ #include "plasma_client.h" #include "plasma_manager.h" +#ifndef _WIN32 +/* This function is actually not declared in standard POSIX, so declare it. */ +extern int usleep(useconds_t usec); +#endif + SUITE(plasma_manager_tests); const char *manager_addr = "127.0.0.1";