Skip to content

Commit

Permalink
[Chef] Fix variable may be used without initialization (project-chip#…
Browse files Browse the repository at this point in the history
…31413)

* Fix variable may be used without initialization

* Restyled by clang-format

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and jamesharrow committed Jan 15, 2024
1 parent 091073c commit 1d23f54
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/chef/common/chef-fan-control-manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Status ChefFanControlManager::HandleStep(StepDirectionEnum aDirection, bool aWra
status = SpeedSetting::Get(mEndpoint, speedSetting);
VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, Status::InvalidCommand);

uint8_t newSpeedSetting;
uint8_t newSpeedSetting = speedSetting.ValueOr(0);
uint8_t speedValue = speedSetting.ValueOr(speedCurrent);
const uint8_t kLowestSpeed = aLowestOff ? 0 : 1;

Expand Down

0 comments on commit 1d23f54

Please sign in to comment.