diff --git a/CMakeLists.txt b/CMakeLists.txt index 236fd4d07c..2b068e0ce0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,7 @@ endif() include_directories(.) include_directories(${CMAKE_CURRENT_BINARY_DIR}) set(CMAKE_CXX_FLAGS "-std=c++11 -W -Wall -Wno-sign-compare") +set(CMAKE_C_FLAGS "-std=c89 -W -Wall -Wno-sign-compare") if(APPLE) set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -undefined dynamic_lookup -flat_namespace") diff --git a/tests/conformance_upb.c b/tests/conformance_upb.c index a2e1d7a973..ccc8a94284 100644 --- a/tests/conformance_upb.c +++ b/tests/conformance_upb.c @@ -141,7 +141,7 @@ bool DoTestIo() { conformance_ConformanceResponse *response; if (!CheckedRead(STDIN_FILENO, &input_size, sizeof(uint32_t))) { - // EOF. + /* EOF. */ return false; } diff --git a/upb/bindings/lua/upb/pb.c b/upb/bindings/lua/upb/pb.c index 15e8107354..bca2ee8546 100644 --- a/upb/bindings/lua/upb/pb.c +++ b/upb/bindings/lua/upb/pb.c @@ -29,7 +29,6 @@ static int lupb_pb_encode(lua_State *L) { const upb_msg *msg = lupb_msg_checkmsg2(L, 1, &layout); upb_arena arena; size_t size; - upb_status status = UPB_STATUS_INIT; char *result; upb_arena_init(&arena);