Fix issues reported by klocwork (#1060)
Fix issues reported by klocwork, fix host_tool compile error, and update build script of benchmark jetstream
This commit is contained in:
@ -15,6 +15,10 @@ void print_mutability(wasm_mutability_t mut) {
|
||||
}
|
||||
|
||||
void print_limits(const wasm_limits_t* limits) {
|
||||
if (!limits) {
|
||||
printf("unknown limits");
|
||||
return;
|
||||
}
|
||||
printf("%ud", limits->min);
|
||||
if (limits->max < wasm_limits_max_default) printf(" %ud", limits->max);
|
||||
}
|
||||
@ -43,6 +47,10 @@ void print_valtypes(const wasm_valtype_vec_t* types) {
|
||||
}
|
||||
|
||||
void print_externtype(const wasm_externtype_t* type) {
|
||||
if (!type) {
|
||||
printf("unknown extern type");
|
||||
return;
|
||||
}
|
||||
switch (wasm_externtype_kind(type)) {
|
||||
case WASM_EXTERN_FUNC: {
|
||||
const wasm_functype_t* functype =
|
||||
@ -78,6 +86,10 @@ void print_externtype(const wasm_externtype_t* type) {
|
||||
}
|
||||
|
||||
void print_name(const wasm_name_t* name) {
|
||||
if (!name) {
|
||||
printf("unknown name");
|
||||
return;
|
||||
}
|
||||
printf("\"%.*s\"", (int)name->size, name->data);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user