diff --git a/test/rpc/Makefile b/test/rpc/Makefile index 46f36a8f3..a3a539fbc 100644 --- a/test/rpc/Makefile +++ b/test/rpc/Makefile @@ -1,6 +1,8 @@ all: test-c rpc_pb2.py criu .PHONY: all +CFLAGS += -g -Werror -Wall + run: all mkdir -p build chmod a+rwx build @@ -11,10 +13,8 @@ criu: chmod u+s $@ test-c: rpc.pb-c.o test.o - gcc $^ -o $@ -lprotobuf-c test.o: test.c - gcc -c $< -I ./ rpc_pb2.py: rpc.proto protoc --proto_path=. --python_out=. rpc.proto diff --git a/test/rpc/test.c b/test/rpc/test.c index 26e0bb6b6..9ef577848 100644 --- a/test/rpc/test.c +++ b/test/rpc/test.c @@ -6,6 +6,7 @@ #include #include #include +#include #define MAX_MSG_SIZE 1024 @@ -58,7 +59,6 @@ int main(int argc, char *argv[]) int ret = 0; struct sockaddr_un addr; socklen_t addr_len; - struct stat st = {0}; if (argc != 3) { fprintf(stderr, "Usage: test-c criu-service.socket imgs_dir");