Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang tidy uninitialized.Branch #17647

Merged
merged 2 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Checks: >
-clang-analyzer-core.UndefinedBinaryOperatorResult,
-clang-analyzer-core.NullDereference,
-clang-analyzer-optin.cplusplus.UninitializedObject,
-clang-analyzer-core.uninitialized.Branch,
-clang-analyzer-optin.performance,
-clang-analyzer-optin.osx.cocoa.localizability.EmptyLocalizationContextChecker,
-clang-analyzer-deadcode.DeadStores,
Expand Down
2 changes: 1 addition & 1 deletion src/app/util/ember-compatibility-functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, b
(attributeCluster != nullptr) ? &reader : GetAttributeAccessOverride(aPath.mEndpointId, aPath.mClusterId);
if (attributeOverride)
{
bool triedEncode;
bool triedEncode = false;
ReturnErrorOnFailure(ReadViaAccessInterface(aSubjectDescriptor.fabricIndex, aIsFabricFiltered, aPath, aAttributeReports,
apEncoderState, attributeOverride, &triedEncode));
ReturnErrorCodeIf(triedEncode, CHIP_NO_ERROR);
Expand Down
1 change: 1 addition & 0 deletions src/lib/core/Optional.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ class Optional

~Optional()
{
// NOLINTNEXTLINE(clang-analyzer-core.uninitialized.Branch): mData is set when mHasValue
if (mHasValue)
{
mValue.mData.~T();
Expand Down