Warnings cleanup

extensions
Volodymyr Shymanskyy 3 years ago
parent 52f80e9e63
commit f85d3ef896

@ -167,7 +167,7 @@ const M3OpInfo* GetOpInfo(m3opcode_t opcode) {
// TODO: This helper should be removed, when MultiValue is implemented
static inline
u8 GetSingleRetType(IM3FuncType ftype) {
return (ftype && ftype->numRets) ? ftype->types[0] : c_m3Type_none;
return (ftype && ftype->numRets) ? ftype->types[0] : (u8)c_m3Type_none;
}
#ifdef DEBUG

@ -642,13 +642,13 @@ _ (ReadLEB_u32 (& index, & bytes, end));
{
i32 offset;
_ (EvaluateExpression (io_module, & offset, c_m3Type_i32, & bytes, end));
_throwif ("table underflow", offset < 0);
u32 numElements;
_ (ReadLEB_u32 (& numElements, & bytes, end));
u32 endElement = numElements + offset;
size_t endElement = numElements + offset;
_throwif ("table overflow", offset >= endElement); // TODO: check this, endElement depends on offset
io_module->table0 = m3_ReallocArray (IM3Function, io_module->table0, endElement, io_module->table0Size);
_throwifnull(io_module->table0);
io_module->table0Size = endElement;

Loading…
Cancel
Save