mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 20:18:20 +00:00
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:
parent
7047eb92d8
commit
db975ac08e
1 changed files with 2 additions and 1 deletions
|
@ -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 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue