Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence GCC warnings in non debug mode building #198

Open
darix opened this issue Dec 30, 2020 · 0 comments
Open

Silence GCC warnings in non debug mode building #198

darix opened this issue Dec 30, 2020 · 0 comments

Comments

@darix
Copy link

darix commented Dec 30, 2020

diff --git a/ext/yajl/yajl_ext.c b/ext/yajl/yajl_ext.c
index 97a052c..18dca25 100644
--- a/ext/yajl/yajl_ext.c
+++ b/ext/yajl/yajl_ext.c
@@ -885,6 +885,8 @@ static VALUE rb_yajl_projector_build_simple_value(yajl_event_stream_t parser, ya
 
         default:;
             assert(0);
+            // silence gcc error handling
+            return Qnil;
     }
 }
 
@@ -923,6 +925,8 @@ static VALUE rb_yajl_projector_build_string(yajl_event_stream_t parser, yajl_eve
 
         default:; {
             assert(0);
+            // silence gcc error handling
+            return Qnil;
         }
     }
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant