Skip to content

Commit

Permalink
Fix "may be used uninitialized" false positives
Browse files Browse the repository at this point in the history
Signed-off-by: Erik Boasson <[email protected]>
  • Loading branch information
eboasson committed Jan 23, 2023
1 parent 5c54bee commit 37c25f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/ddsi/src/ddsi_typebuilder.c
Original file line number Diff line number Diff line change
Expand Up @@ -1786,7 +1786,7 @@ static dds_return_t get_topic_descriptor (dds_topic_descriptor_t *desc, struct t
goto err;
}

struct dds_key_descriptor *key_desc;
struct dds_key_descriptor *key_desc = NULL;
if ((ret = typebuilder_get_keys (tbd, &ops, &key_desc)))
{
typebuilder_ops_fini (&ops);
Expand Down
2 changes: 1 addition & 1 deletion src/core/ddsi/src/ddsi_typewrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2563,7 +2563,7 @@ bool ddsi_xt_is_assignable_from (struct ddsi_domaingv *gv, const struct xt_type

static ddsi_typeid_kind_t ddsi_typeid_kind_impl (const struct DDS_XTypes_TypeIdentifier *type_id)
{
ddsi_typeid_kind_t kind;
ddsi_typeid_kind_t kind = DDSI_TYPEID_KIND_MINIMAL; // initialize to avoid gcc-12 warning
if (ddsi_typeid_is_hash_impl (type_id))
kind = ddsi_typeid_is_minimal_impl (type_id) ? DDSI_TYPEID_KIND_MINIMAL : DDSI_TYPEID_KIND_COMPLETE;
else
Expand Down

0 comments on commit 37c25f2

Please sign in to comment.