Only void functions should return nothing. Others functions should return something and if not we want to be able to emit a diagnostic. Fix this by testing the return type instead of the size of the return type. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> --- linearize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linearize.c b/linearize.c index 298991dcd..69e4f3e8f 100644 --- a/linearize.c +++ b/linearize.c @@ -2218,7 +2218,7 @@ static struct entrypoint *linearize_fn(struct symbol *sym, struct symbol *base_t struct symbol *ret_type = base_type->ctype.base_type; struct instruction *insn = alloc_typed_instruction(OP_RET, ret_type); - if (type_size(ret_type) > 0) + if (!is_void_type(ret_type)) use_pseudo(insn, result, &insn->src); add_one_insn(ep, insn); } -- 2.14.0 -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html