Fix maybe-uninitialized warning in ZVal::ToVal()

Some compilers warn that 'v' may be used uninitialized but shouldn't be
the case in practice since all cases are handled, making it impossible.
This commit is contained in:
Jon Siwek 2021-03-26 19:06:29 -07:00
parent 7047eb92d8
commit db975ac08e

View file

@ -263,8 +263,9 @@ ValPtr ZVal::ToVal(const TypePtr& t) const
case TYPE_TIMER:
case TYPE_UNION:
case TYPE_VOID:
default:
v = nullptr;
reporter->InternalError("bad ret type return tag");
reporter->InternalError("bad type in ZVal::ToVal: %s", type_name(t->Tag()));
}
if ( v )