From 09b29445385fb5b41915b30b25082c0d7891dae8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sun, 6 Dec 2020 20:54:15 +0100 Subject: [PATCH] :art: Remove Warnings --- src/import/import_cdef.c | 10 ---------- src/lib/object_op.c | 3 +-- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/import/import_cdef.c b/src/import/import_cdef.c index cdb73487..de3bdcd1 100644 --- a/src/import/import_cdef.c +++ b/src/import/import_cdef.c @@ -26,16 +26,6 @@ ANN static m_bool mk_xtor(MemPool p, const Type type, const m_uint d, const enum return GW_OK; } -ANN2(1,2) static inline m_bool class_parent(const Env env, Type t) { - do { - if(tflag(t, tflag_check)) - break; - if(t->info->cdef) - CHECK_BB(traverse_class_def(env, t->info->cdef)) - } while((t = t->info->parent)); - return GW_OK; -} - ANN2(1,2) static void import_class_ini(const Env env, const Type t) { t->nspc = new_nspc(env->gwion->mp, t->name); t->nspc->parent = env->curr; diff --git a/src/lib/object_op.c b/src/lib/object_op.c index dfdf4cb8..e9ca5822 100644 --- a/src/lib/object_op.c +++ b/src/lib/object_op.c @@ -68,11 +68,10 @@ static OP_CHECK(at_object) { const Type l = bin->lhs->info->type; const Type r = bin->rhs->info->type; - const uint is_new = bin->lhs->exp_type == ae_exp_unary && bin->lhs->d.exp_unary.op == insert_symbol(emit->gwion->st, "new"); if(bin->lhs->exp_type == ae_exp_unary && bin->lhs->d.exp_unary.op == insert_symbol(emit->gwion->st, "new")) { for(m_uint i = vector_size(&emit->code->instr); --i;) { const Instr instr = (Instr)vector_at(&emit->code->instr, i - 1); - if(instr->opcode == GcAdd) { + if(instr->opcode == (m_uint)GcAdd) { vector_rem(&emit->code->instr, i - 1); mp_free(emit->gwion->mp, Instr, instr); } -- 2.43.0