From fa0fa18134e95850a9a15ace8e40f5d8fcf7e4d5 Mon Sep 17 00:00:00 2001 From: murgatroid99 <mlumish@google.com> Date: Tue, 7 Jul 2015 18:02:00 -0700 Subject: [PATCH] Check more warnings in Ruby library, add -Werror --- src/ruby/ext/grpc/extconf.rb | 11 +++++------ src/ruby/ext/grpc/rb_server.c | 6 +++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index 105689627b..de5b0ea336 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -54,12 +54,6 @@ LIB_DIRS = [ LIBDIR ] -$CFLAGS << ' -Wno-implicit-function-declaration ' -$CFLAGS << ' -Wno-pointer-sign ' -$CFLAGS << ' -Wno-return-type ' -$CFLAGS << ' -Wall ' -$CFLAGS << ' -pedantic ' - grpc_pkg_config = system('pkg-config --exists grpc') if grpc_pkg_config @@ -100,5 +94,10 @@ else end end +$CFLAGS << ' -std=c99 ' +$CFLAGS << ' -Wall ' +$CFLAGS << ' -Wextra ' +$CFLAGS << ' -pedantic ' +$CFLAGS << ' -Werror ' create_makefile('grpc/grpc') diff --git a/src/ruby/ext/grpc/rb_server.c b/src/ruby/ext/grpc/rb_server.c index 9c0d24bf8f..bed3b26850 100644 --- a/src/ruby/ext/grpc/rb_server.c +++ b/src/ruby/ext/grpc/rb_server.c @@ -68,8 +68,12 @@ static void grpc_rb_server_free(void *p) { /* Deletes the wrapped object if the mark object is Qnil, which indicates that no other object is the actual owner. */ + /* grpc_server_shutdown does not exist. Change this to something that does + or delete it */ if (svr->wrapped != NULL && svr->mark == Qnil) { - grpc_server_shutdown(svr->wrapped); + // grpc_server_shutdown(svr->wrapped); + // Aborting to indicate a bug + abort(); grpc_server_destroy(svr->wrapped); } -- GitLab