From 764b06ee48180136e64edeac0935d44ca66fadec Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Wed, 20 Apr 2022 12:27:09 +0200 Subject: [PATCH] :art: LGTM --- ast | 2 +- fmt | 2 +- src/emit/emit.c | 10 +++++----- src/lib/dict.c | 4 ++-- src/main.c | 1 - src/parse/template.c | 4 ++-- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/ast b/ast index 95366bed..1dbe4b19 160000 --- a/ast +++ b/ast @@ -1 +1 @@ -Subproject commit 95366beda5cdee923011fa5cf53269c74a1ec791 +Subproject commit 1dbe4b1915f5b958a5ab8ec2a4b98aa5100e8981 diff --git a/fmt b/fmt index 2d888067..cf352393 160000 --- a/fmt +++ b/fmt @@ -1 +1 @@ -Subproject commit 2d8880671c5dcab3f2f67e6e7a5a8c40eeecd962 +Subproject commit cf3523938d57ae658952b1104f8b91dbd3dd8ea2 diff --git a/src/emit/emit.c b/src/emit/emit.c index 0c5787d8..5d5ce858 100644 --- a/src/emit/emit.c +++ b/src/emit/emit.c @@ -1985,12 +1985,12 @@ ANN2(1,2) static Instr _flow(const Emitter emit, const Exp e, Instr *const instr // CHECK_BO(emit_exp_pop_next(emit, e)); CHECK_BO(emit_exp(emit, e)); { - const Instr instr = (Instr)vector_back(&emit->code->instr); - if(instr->execute == fast_except) { + const Instr ex = (Instr)vector_back(&emit->code->instr); + if(ex->execute == fast_except) { vector_rem(&emit->code->instr, vector_size(&emit->code->instr) - 1); - if(instr->m_val2) - mp_free2(emit->gwion->mp, sizeof(struct FastExceptInfo), (struct FastExceptInfo*)instr->m_val2); - free_instr(emit->gwion, instr); + if(ex->m_val2) + mp_free2(emit->gwion->mp, sizeof(struct FastExceptInfo), (struct FastExceptInfo*)ex->m_val2); + free_instr(emit->gwion, ex); } } if(instr) diff --git a/src/lib/dict.c b/src/lib/dict.c index 0e85c398..98d4f121 100644 --- a/src/lib/dict.c +++ b/src/lib/dict.c @@ -488,8 +488,8 @@ static OP_EMIT(opem_dict_remove) { CHECK_BB(emit_dict_iter(emit, hinfo, &opi, &call, bin->lhs)); if(hinfo->keyk || hinfo->valk) { clear_fn *const fn = clear[hinfo->keyk][hinfo->valk]; - const Instr clear = emit_add_instr(emit, hmap_remove_clear); - clear->m_val = (m_uint)fn; + const Instr instr = emit_add_instr(emit, hmap_remove_clear); + instr->m_val = (m_uint)fn; } const Instr pushval = emit_add_instr(emit, hmap_remove); diff --git a/src/main.c b/src/main.c index 1a0a5f4f..1811e9dc 100644 --- a/src/main.c +++ b/src/main.c @@ -44,7 +44,6 @@ int main(int argc, char **argv) { CliArg arg = {.arg = {.argc = argc, .argv = argv}, .loop = false}; signal(SIGINT, sig); signal(SIGTERM, sig); - struct Gwion_ gwion = {}; const m_bool ini = gwion_ini(&gwion, &arg); arg_release(&arg); if (ini > 0) gwion_run(&gwion); diff --git a/src/parse/template.c b/src/parse/template.c index 69d3d53c..3cb6fcd1 100644 --- a/src/parse/template.c +++ b/src/parse/template.c @@ -132,8 +132,8 @@ ANN static Type _scan_type(const Env env, const Type t, Type_Decl *td) { Specialized_List sl = t->info->cdef->base.tmpl ? t->info->cdef->base.tmpl->list : NULL; for(uint32_t i = 0; i < tl->len; i++) { - Type_Decl *td = *mp_vector_at(tl, Type_Decl*, i); - DECL_OO(const Type, t, = known_type(env, td)); + Type_Decl *tmp = *mp_vector_at(tl, Type_Decl*, i); + DECL_OO(const Type, t, = known_type(env, tmp)); Specialized *spec = mp_vector_at(sl, Specialized, i); if(spec->traits) { Symbol missing = miss_traits(t, spec); -- 2.43.0