From 2cabcc44858627f0951d9b702baf8120be7c5cf3 Mon Sep 17 00:00:00 2001 From: Johnny Richard Date: Sun, 30 Apr 2023 00:43:25 +0200 Subject: style: Add -Wmissing-declarations to CC CFLAGS The refactoring also replace a if statement by switch statement. Signed-off-by: Johnny Richard --- src/pipac.c | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'src/pipac.c') diff --git a/src/pipac.c b/src/pipac.c index d5781a5..a0031a5 100644 --- a/src/pipac.c +++ b/src/pipac.c @@ -24,7 +24,7 @@ #include "parser.h" #include "string_view.h" -void +static void generate_gas_x86_64_linux(ast_node_t *func) { gas_assembly_generator_t gen; @@ -32,27 +32,13 @@ generate_gas_x86_64_linux(ast_node_t *func) gas_assembly_generator_compile(&gen, func); } -void +static void print_usage() { fputs("pipac \n", stderr); } -void -print_tokens(lexer_t *lexer) -{ - token_t token; - for (lexer_next_token(lexer, &token); token.kind != TOKEN_EOF; lexer_next_token(lexer, &token)) { - printf("%s:%d:%d: [kind=%d, value='" SVFMT "']\n", - lexer->filepath, - token.row + 1, - token.col + 1, - token.kind, - SVARG(&token.value)); - } -} - -void +static void parser_print_errors(parser_t *parser) { for (int i = 0; i < parser->errors_len; i++) { -- cgit v1.2.3