diff --git a/graphql-c_parser/ext/graphql_c_parser_ext/graphql_c_parser_ext.c b/graphql-c_parser/ext/graphql_c_parser_ext/graphql_c_parser_ext.c index c8a67aede9..e96d772635 100644 --- a/graphql-c_parser/ext/graphql_c_parser_ext/graphql_c_parser_ext.c +++ b/graphql-c_parser/ext/graphql_c_parser_ext/graphql_c_parser_ext.c @@ -9,7 +9,7 @@ VALUE GraphQL_CParser_Parser_c_parse(VALUE self) { return Qnil; } -void Init_graphql_c_parser_ext() { +void Init_graphql_c_parser_ext(void) { VALUE GraphQL = rb_define_module("GraphQL"); VALUE CParser = rb_define_module_under(GraphQL, "CParser"); VALUE Lexer = rb_define_module_under(CParser, "Lexer"); diff --git a/graphql-c_parser/ext/graphql_c_parser_ext/graphql_c_parser_ext.h b/graphql-c_parser/ext/graphql_c_parser_ext/graphql_c_parser_ext.h index 412b395569..0fca80ced2 100644 --- a/graphql-c_parser/ext/graphql_c_parser_ext/graphql_c_parser_ext.h +++ b/graphql-c_parser/ext/graphql_c_parser_ext/graphql_c_parser_ext.h @@ -4,5 +4,5 @@ #include #include "lexer.h" #include "parser.h" -void Init_graphql_c_parser_ext(); +void Init_graphql_c_parser_ext(void); #endif diff --git a/graphql-c_parser/ext/graphql_c_parser_ext/lexer.c b/graphql-c_parser/ext/graphql_c_parser_ext/lexer.c index 29246810d0..5b8f80a6c3 100644 --- a/graphql-c_parser/ext/graphql_c_parser_ext/lexer.c +++ b/graphql-c_parser/ext/graphql_c_parser_ext/lexer.c @@ -1989,7 +1989,7 @@ var_name = rb_utf8_str_new_cstr(str_content); \ rb_global_variable(&var_name); \ rb_str_freeze(var_name); \ -void setup_static_token_variables() { +void setup_static_token_variables(void) { SETUP_STATIC_TOKEN_VARIABLE(ON, "on") SETUP_STATIC_TOKEN_VARIABLE(FRAGMENT, "fragment") SETUP_STATIC_TOKEN_VARIABLE(QUERY, "query") diff --git a/graphql-c_parser/ext/graphql_c_parser_ext/lexer.h b/graphql-c_parser/ext/graphql_c_parser_ext/lexer.h index 199628266b..0ff948e0f5 100644 --- a/graphql-c_parser/ext/graphql_c_parser_ext/lexer.h +++ b/graphql-c_parser/ext/graphql_c_parser_ext/lexer.h @@ -2,5 +2,5 @@ #define Graphql_lexer_h #include VALUE tokenize(VALUE query_rbstr, int fstring_identifiers, int reject_numbers_followed_by_names, int max_tokens); -void setup_static_token_variables(); +void setup_static_token_variables(void); #endif diff --git a/graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl b/graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl index c9d762cca6..5d42aaee80 100644 --- a/graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl +++ b/graphql-c_parser/ext/graphql_c_parser_ext/lexer.rl @@ -421,7 +421,7 @@ VALUE tokenize(VALUE query_rbstr, int fstring_identifiers, int reject_numbers_fo rb_global_variable(&var_name); \ rb_str_freeze(var_name); \ -void setup_static_token_variables() { +void setup_static_token_variables(void) { SETUP_STATIC_TOKEN_VARIABLE(ON, "on") SETUP_STATIC_TOKEN_VARIABLE(FRAGMENT, "fragment") SETUP_STATIC_TOKEN_VARIABLE(QUERY, "query") diff --git a/graphql-c_parser/ext/graphql_c_parser_ext/parser.c b/graphql-c_parser/ext/graphql_c_parser_ext/parser.c index ac40bb36b3..f7044ffc21 100644 --- a/graphql-c_parser/ext/graphql_c_parser_ext/parser.c +++ b/graphql-c_parser/ext/graphql_c_parser_ext/parser.c @@ -75,7 +75,7 @@ #define YYSTACK_USE_ALLOCA 1 int yylex(YYSTYPE *, VALUE, VALUE); -void yyerror(VALUE, VALUE, const char*); +NORETURN(void yyerror(VALUE, VALUE, const char*)); static VALUE GraphQL_Language_Nodes_NONE; static VALUE r_string_query; @@ -3318,7 +3318,7 @@ void yyerror(VALUE parser, VALUE filename, const char *msg) { rb_global_variable(&GraphQL_Language_Nodes_##node_class_name); \ GraphQL_Language_Nodes_##node_class_name = rb_const_get_at(mGraphQLLanguageNodes, rb_intern(#node_class_name)); -void initialize_node_class_variables() { +void initialize_node_class_variables(void) { VALUE mGraphQL = rb_const_get_at(rb_cObject, rb_intern("GraphQL")); VALUE mGraphQLLanguage = rb_const_get_at(mGraphQL, rb_intern("Language")); VALUE mGraphQLLanguageNodes = rb_const_get_at(mGraphQLLanguage, rb_intern("Nodes")); diff --git a/graphql-c_parser/ext/graphql_c_parser_ext/parser.h b/graphql-c_parser/ext/graphql_c_parser_ext/parser.h index 1e76a505b9..62cebcad2b 100644 --- a/graphql-c_parser/ext/graphql_c_parser_ext/parser.h +++ b/graphql-c_parser/ext/graphql_c_parser_ext/parser.h @@ -1,5 +1,5 @@ #ifndef Graphql_parser_h #define Graphql_parser_h int yyparse(VALUE parser, VALUE filename); -void initialize_node_class_variables(); +void initialize_node_class_variables(void); #endif diff --git a/graphql-c_parser/ext/graphql_c_parser_ext/parser.y b/graphql-c_parser/ext/graphql_c_parser_ext/parser.y index 83a87685c4..b6b2ef7dff 100644 --- a/graphql-c_parser/ext/graphql_c_parser_ext/parser.y +++ b/graphql-c_parser/ext/graphql_c_parser_ext/parser.y @@ -9,7 +9,7 @@ #define YYSTACK_USE_ALLOCA 1 int yylex(YYSTYPE *, VALUE, VALUE); -void yyerror(VALUE, VALUE, const char*); +NORETURN(void yyerror(VALUE, VALUE, const char*)); static VALUE GraphQL_Language_Nodes_NONE; static VALUE r_string_query; @@ -928,7 +928,7 @@ void yyerror(VALUE parser, VALUE filename, const char *msg) { rb_global_variable(&GraphQL_Language_Nodes_##node_class_name); \ GraphQL_Language_Nodes_##node_class_name = rb_const_get_at(mGraphQLLanguageNodes, rb_intern(#node_class_name)); -void initialize_node_class_variables() { +void initialize_node_class_variables(void) { VALUE mGraphQL = rb_const_get_at(rb_cObject, rb_intern("GraphQL")); VALUE mGraphQLLanguage = rb_const_get_at(mGraphQL, rb_intern("Language")); VALUE mGraphQLLanguageNodes = rb_const_get_at(mGraphQLLanguage, rb_intern("Nodes"));