From 5a194a3e0dc01d7ba0d9ad81030284ebda13cbd6 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 8 Dec 2025 02:08:47 -0500 Subject: Add checks for unused variables --- src/compile/headers.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/compile/headers.c') diff --git a/src/compile/headers.c b/src/compile/headers.c index dc57da77..e90556a1 100644 --- a/src/compile/headers.c +++ b/src/compile/headers.c @@ -104,8 +104,8 @@ static void _define_types_and_funcs(compile_typedef_info_t *info, ast_t *ast) { compile_statement_namespace_header(info->env, info->header_path, ast)); } -static void add_type_headers(type_ast_t *type_ast, void *userdata) { - if (!type_ast) return; +static visit_behavior_t add_type_headers(type_ast_t *type_ast, void *userdata) { + if (!type_ast) return VISIT_STOP; if (type_ast->tag == EnumTypeAST) { compile_typedef_info_t *info = (compile_typedef_info_t *)userdata; @@ -126,6 +126,8 @@ static void add_type_headers(type_ast_t *type_ast, void *userdata) { *info->header = Texts(*info->header, compile_enum_header(info->env, name, enum_->tags)); } + + return VISIT_PROCEED; } public -- cgit v1.2.3