From aa4203aecc94a600190b80b5669ccaeeef431147 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Thu, 15 Aug 2019 02:12:24 +0200 Subject: [PATCH] :shirt: Fix some warnings --- include/emit.h | 2 ++ src/parse/scan0.c | 2 +- src/parse/template.c | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/emit.h b/include/emit.h index ba1822ef..fdfe3dfc 100644 --- a/include/emit.h +++ b/include/emit.h @@ -38,4 +38,6 @@ ANN void emit_class_finish(const Emitter, const Nspc); ANN void emit_ext_ctor(const Emitter, const VM_Code); ANN void emit_union_offset(Decl_List, const m_uint); ANN2(1,2) m_bool emit_instantiate_object(const Emitter, const Type, const Array_Sub, const m_bool); +ANN m_uint emit_code_offset(const Emitter emit); +ANN m_uint emit_local(const Emitter emit, const m_uint size, const m_bool is_obj); #endif diff --git a/src/parse/scan0.c b/src/parse/scan0.c index fb63c5b4..220b37e2 100644 --- a/src/parse/scan0.c +++ b/src/parse/scan0.c @@ -23,7 +23,7 @@ ANN static Value mk_class(const Env env, const Type base) { t->e->d.base_type = base; v->owner = base->e->owner; SET_FLAG(v, const | ae_flag_checked); - map_set(&base->e->owner->info->value->map, sym, v); + map_set(&base->e->owner->info->value->map, (vtype)sym, (vtype)v); return v; } diff --git a/src/parse/template.c b/src/parse/template.c index 68f018cd..327b5c91 100644 --- a/src/parse/template.c +++ b/src/parse/template.c @@ -228,7 +228,7 @@ ANN Type scan_type(const Env env, const Type t, const Type_Decl* type) { ret->e->parent = t; ret->name = s_name(sym); SET_FLAG(ret, func); - map_set(&t->e->owner->info->type->map, sym, ret); + map_set(&t->e->owner->info->type->map, (vtype)sym, (vtype)ret); const Func_Def def = cpy_func_def(env->gwion->mp, t->e->d.func->def); const Func func = ret->e->d.func = new_func(env->gwion->mp, s_name(sym), def); const Value value = new_value(env->gwion->mp, ret, s_name(sym)); @@ -239,7 +239,7 @@ ANN Type scan_type(const Env env, const Type t, const Type_Decl* type) { func->value_ref = value; func->def->base->tmpl = mk_tmpl(env, t, t->e->d.func->def->base->tmpl, type->types); def->base->func = func; - map_set(&t->e->owner->info->value->map, sym, value); // to base ? + map_set(&t->e->owner->info->value->map, (vtype)sym, (vtype)value); // to base ? return ret; } ERR_O(type->xid->pos, -- 2.43.0