Skip to content

Commit 260044d

Browse files
Fix potentially uninitialized variable warning in CMKeyboardV2Controller.cpp
1 parent 88493da commit 260044d

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

Controllers/CoolerMasterController/CMKeyboardController/CMKeyboardV2Controller.cpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -450,13 +450,17 @@ void CMKeyboardV2Controller::SetMode(mode selectedMode)
450450
std::vector<uint8_t> data1(64, 0);
451451
std::vector<uint8_t> data2(64, 0);
452452

453-
uint8_t cColor1_R, cColor1_G, cColor1_B;
454-
uint8_t cColor2_R, cColor2_G, cColor2_B;
455-
456-
RGBColor color1 = 0;
457-
RGBColor color2 = 0;
458-
uint8_t cSpeed1 = 0;
459-
uint8_t cSpeed2 = 0;
453+
uint8_t cColor1_R = 0;
454+
uint8_t cColor1_G = 0;
455+
uint8_t cColor1_B = 0;
456+
uint8_t cColor2_R = 0;
457+
uint8_t cColor2_G = 0;
458+
uint8_t cColor2_B = 0;
459+
460+
RGBColor color1 = 0;
461+
RGBColor color2 = 0;
462+
uint8_t cSpeed1 = 0;
463+
uint8_t cSpeed2 = 0;
460464

461465
_UpdateSpeed(selectedMode, cSpeed1, cSpeed2);
462466

0 commit comments

Comments
 (0)