From 91da5622c92020262d04c5624ff801243e827323 Mon Sep 17 00:00:00 2001 From: Wojciech Kosior Date: Mon, 21 Sep 2020 17:51:41 +0200 Subject: point out the fact, that only one value type is supported for now --- tools/parse_module.c | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tools/parse_module.c b/tools/parse_module.c index 7c54144..155fc9c 100644 --- a/tools/parse_module.c +++ b/tools/parse_module.c @@ -4,11 +4,21 @@ static inline int is_valid_valtype(char value_type) { - return - value_type == VALTYPE_I32 || - value_type == VALTYPE_I64 || - value_type == VALTYPE_F32 || - value_type == VALTYPE_F64; + if (value_type == VALTYPE_I32) + return 1; + + if (value_type == VALTYPE_I64 || + value_type == VALTYPE_F32 || + value_type == VALTYPE_F64) + PRERR("Only type i32 is recognized for now"); + + return -1; + + /* return */ + /* value_type == VALTYPE_I32 || */ + /* value_type == VALTYPE_I64 || */ + /* value_type == VALTYPE_F32 || */ + /* value_type == VALTYPE_F64; */ } static inline int is_valid_exportdesc(char desc) -- cgit v1.2.3