Skip to content

Commit

Permalink
Fix - default_type_kind may be used uninitialized
Browse files Browse the repository at this point in the history
Signed-off-by: tempate <danieldiaz@eprosima.com>
  • Loading branch information
Tempate committed Jul 11, 2024
1 parent 1e866de commit d82da58
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cpp/fastdds/xtypes/serializers/idl/dynamic_type_idl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,9 @@ ReturnCode_t get_default_type_kind(
}
else
{
// Set to none to avoid `may be used uninitialized` error
default_type = TK_NONE;

EPROSIMA_LOG_ERROR(DYNAMIC_TYPE_IDL, "Size " << size << " is not supported.");
return RETCODE_BAD_PARAMETER;
}
Expand Down

0 comments on commit d82da58

Please sign in to comment.