diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-12-08 02:08:47 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-12-08 02:09:52 -0500 |
| commit | 5a194a3e0dc01d7ba0d9ad81030284ebda13cbd6 (patch) | |
| tree | 61c7419612cafe56f25f37b1718c57f716980048 /src/compile/headers.c | |
| parent | 86228917b98a3ef4019e9e18fcafacc948ffcfd1 (diff) | |
Add checks for unused variables
Diffstat (limited to 'src/compile/headers.c')
| -rw-r--r-- | src/compile/headers.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 |
