From fcfc7fedc97b9995e82fe56bc293832284e277ae Mon Sep 17 00:00:00 2001 From: Matteo Flebus Date: Fri, 30 Jan 2026 18:26:56 +0100 Subject: [PATCH] fix(clang-tidy): for clang, function cannot return bool if it takes no arguments ???? --- src/parser/grammar.c | 2 +- src/parser/grammar.h | 2 +- src/parser/parser.c | 2 +- src/parser/parser.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parser/grammar.c b/src/parser/grammar.c index b89a99e..6089c18 100644 --- a/src/parser/grammar.c +++ b/src/parser/grammar.c @@ -91,7 +91,7 @@ static bool init_firsts_map(void) // === Functions -bool grammar_init(void) +int grammar_init(void) { // Initialize the firsts map bool success = init_firsts_map(); diff --git a/src/parser/grammar.h b/src/parser/grammar.h index 663d37b..020d733 100644 --- a/src/parser/grammar.h +++ b/src/parser/grammar.h @@ -64,7 +64,7 @@ struct firsts_list * @return PARSER_INIT_SUCCESS on success PARSER_INIT_ERROR on error * @warning Do not use outside the parser */ -bool grammar_init(void); +int grammar_init(void); /* * @brief Closes the grammar submodule diff --git a/src/parser/parser.c b/src/parser/parser.c index c2b8aaf..ec60b71 100644 --- a/src/parser/parser.c +++ b/src/parser/parser.c @@ -10,7 +10,7 @@ static enum parser_state state = PARSER_STATE_NOT_INITIALIZED; // === Functions -bool parser_init(void) +int parser_init(void) { if (state == PARSER_STATE_READY) { diff --git a/src/parser/parser.h b/src/parser/parser.h index a79497b..dc01a5e 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -18,7 +18,7 @@ enum parser_state * * @return Returns false on error and true on success */ -bool parser_init(void); +int parser_init(void); /* @brief Closes the parser module after use */