Skip to content

Commit 8f89583

Browse files
Fix some warnings
1 parent 8487b5c commit 8f89583

File tree

5 files changed

+31
-24
lines changed

5 files changed

+31
-24
lines changed

Controllers/PowerColorGPUController/PowerColorRedDevilV2Controller/PowerColorRedDevilV2Controller.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
| SPDX-License-Identifier: GPL-2.0-only |
1010
\*---------------------------------------------------------*/
1111

12+
#pragma once
13+
1214
#include <string>
1315
#include "i2c_smbus.h"
1416
#include "RGBController.h"
1517

16-
#pragma once
17-
1818
typedef unsigned char red_devil_v2_dev_id;
1919

2020
struct red_devil_v2_mode

Controllers/PowerColorGPUController/PowerColorRedDevilV2Controller/RGBController_PowerColorRedDevilV2.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
| SPDX-License-Identifier: GPL-2.0-only |
1010
\*---------------------------------------------------------*/
1111

12-
#pragma once
13-
1412
#include "RGBController.h"
1513
#include "RGBController_PowerColorRedDevilV2.h"
1614

@@ -262,7 +260,7 @@ void RGBController_PowerColorRedDevilV2::DeviceUpdateLEDs()
262260
| single register write instead of writing to each LED |
263261
\*---------------------------------------------------------*/
264262
bool all_same = true;
265-
for(int i = 1; i < colors.size(); i++)
263+
for(std::size_t i = 1; i < colors.size(); i++)
266264
{
267265
if(colors[i-1] != colors[i])
268266
{
@@ -285,11 +283,11 @@ void RGBController_PowerColorRedDevilV2::DeviceUpdateLEDs()
285283
| Since writing to each LED is slow check which colors have |
286284
| changed and only write those instead |
287285
\*---------------------------------------------------------*/
288-
for(int i = 0; i < colors.size(); i++)
286+
for(std::size_t i = 0; i < colors.size(); i++)
289287
{
290288
if(colors[i] != colors_copy[i])
291289
{
292-
controller->SetLedColor(i, colors[i]);
290+
controller->SetLedColor((int)i, colors[i]);
293291
}
294292
}
295293
}
@@ -325,9 +323,9 @@ void RGBController_PowerColorRedDevilV2::ReadConfig()
325323
red_devil_v2_mode mode = controller->GetMode();
326324
bool sync = controller->GetSync();
327325

328-
for(int i = 0; i < colors.size(); i++)
326+
for(std::size_t i = 0; i < colors.size(); i++)
329327
{
330-
colors[i] = controller->GetLedColor(i);
328+
colors[i] = controller->GetLedColor((int)i);
331329
}
332330

333331
/*---------------------------------------------------------*\
@@ -348,4 +346,4 @@ void RGBController_PowerColorRedDevilV2::ReadConfig()
348346

349347
modes[active_mode].brightness = mode.brightness;
350348
modes[active_mode].speed = mode.speed;
351-
}
349+
}

Controllers/StreamDeckController/ElgatoStreamDeckController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void ElgatoStreamDeckController::SendFullFrame(const std::vector<std::vector<uns
5050
{
5151
for(int btnIdx = 0; btnIdx < 15; btnIdx++)
5252
{
53-
if(btnIdx < buttonImages.size())
53+
if(btnIdx < (int)buttonImages.size())
5454
{
5555
SendButtonImage(btnIdx, buttonImages[btnIdx]);
5656
}

Controllers/StreamDeckController/RGBController_ElgatoStreamDeck.cpp

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
@direct :white_check_mark:
2121
@effects :x:
2222
@detectors DetectElgatoStreamDeckControllers
23-
@comment
23+
@comment
2424
\*-------------------------------------------------------------------*/
2525

2626
RGBController_ElgatoStreamDeck::RGBController_ElgatoStreamDeck(ElgatoStreamDeckController *controller_ptr) : controller(controller_ptr)
@@ -107,15 +107,22 @@ void RGBController_ElgatoStreamDeck::DeviceUpdateLEDs()
107107
controller->SendFullFrame(buttonImages);
108108
}
109109

110-
void RGBController_ElgatoStreamDeck::UpdateZoneLEDs(int zone)
110+
void RGBController_ElgatoStreamDeck::UpdateZoneLEDs(int /*zone*/)
111111
{
112112
DeviceUpdateLEDs();
113113
}
114114

115-
void RGBController_ElgatoStreamDeck::UpdateSingleLED(int led)
115+
void RGBController_ElgatoStreamDeck::UpdateSingleLED(int /*led*/)
116116
{
117117
DeviceUpdateLEDs();
118118
}
119119

120-
void RGBController_ElgatoStreamDeck::ResizeZone(int, int) {}
121-
void RGBController_ElgatoStreamDeck::DeviceUpdateMode() {}
120+
void RGBController_ElgatoStreamDeck::ResizeZone(int /*zone*/, int /*new_size*/)
121+
{
122+
123+
}
124+
125+
void RGBController_ElgatoStreamDeck::DeviceUpdateMode()
126+
{
127+
128+
}

Controllers/StreamDeckController/RGBController_ElgatoStreamDeck.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,16 @@ class RGBController_ElgatoStreamDeck : public RGBController
1818
{
1919
public:
2020
explicit RGBController_ElgatoStreamDeck(ElgatoStreamDeckController* controller_ptr);
21-
~RGBController_ElgatoStreamDeck() override;
22-
23-
void SetupZones() override;
24-
void ResizeZone(int zone, int new_size) override;
25-
void DeviceUpdateLEDs() override;
26-
void UpdateZoneLEDs(int zone) override;
27-
void UpdateSingleLED(int led) override;
28-
void DeviceUpdateMode() override;
21+
~RGBController_ElgatoStreamDeck();
22+
23+
void SetupZones();
24+
void ResizeZone(int zone, int new_size);
25+
26+
void DeviceUpdateLEDs();
27+
void UpdateZoneLEDs(int zone);
28+
void UpdateSingleLED(int led);
29+
30+
void DeviceUpdateMode();
2931

3032
private:
3133
ElgatoStreamDeckController* controller;

0 commit comments

Comments
 (0)