Skip to content

Commit

Permalink
IVGCVSW-7963 Uninitialized variable error in coverity
Browse files Browse the repository at this point in the history
 * Initialised the uninitialized variable.

Signed-off-by: Mike Kelly <[email protected]>
Change-Id: Ifb002ee53cb9b2a2559c282a9b30192790d36d05
  • Loading branch information
MikeJKelly authored and John-ARM committed Aug 10, 2023
1 parent b988ea4 commit 3c6ce0a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/armnn/Optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ class OptionalReferenceSwitch : public OptionalBase
m_HasValue = true;
}

alignas(alignof(T)) unsigned char m_Storage[sizeof(T)];
alignas(alignof(T)) unsigned char m_Storage[sizeof(T)] = {};
};

///
Expand Down
2 changes: 1 addition & 1 deletion profiling/common/include/Optional.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class OptionalReferenceSwitch : public OptionalBase
m_HasValue = true;
}

alignas(alignof(T)) unsigned char m_Storage[sizeof(T)];
alignas(alignof(T)) unsigned char m_Storage[sizeof(T)] = {};
};

///
Expand Down

0 comments on commit 3c6ce0a

Please sign in to comment.