Skip to content

Commit 0345eb5

Browse files
More warning fixes
1 parent f568253 commit 0345eb5

19 files changed

Lines changed: 35 additions & 20 deletions

Controllers/AorusCPUCoolerController/AorusCPUCoolerControllerDetect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void DetectAorusCPUCoolerControllers(std::vector<RGBController*>& rgb_controller
4343
{
4444
hid_init();
4545

46-
for(int device_idx = 0; device_idx < NUM_DEVICES; device_idx++)
46+
for(unsigned int device_idx = 0; device_idx < NUM_DEVICES; device_idx++)
4747
{
4848
hid_device_info* info = hid_enumerate(device_list[device_idx].usb_vid, device_list[device_idx].usb_pid);
4949

Controllers/CoolerMasterController/CoolerMasterControllerDetect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void DetectCoolerMasterControllers(std::vector<RGBController*>& rgb_controllers)
4444
hid_device* dev = NULL;
4545
if(info->vendor_id == COOLERMASTER_VID)
4646
{
47-
for(int cm_pid_idx = 0; cm_pid_idx < COOLERMASTER_NUM_DEVICES; cm_pid_idx++)
47+
for(unsigned int cm_pid_idx = 0; cm_pid_idx < COOLERMASTER_NUM_DEVICES; cm_pid_idx++)
4848
{
4949
if((info->product_id == cm_pids[cm_pid_idx][CM_PID])
5050
&&(info->interface_number == cm_pids[cm_pid_idx][CM_INTERFACE]))

Controllers/EKController/EKControllerDetect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void DetectEKControllers(std::vector<RGBController*>& rgb_controllers)
4242
hid_device* dev = NULL;
4343
if(info->vendor_id == EK_VID)
4444
{
45-
for(int ek_pid_idx = 0; ek_pid_idx < EK_NUM_DEVICES; ek_pid_idx++)
45+
for(unsigned int ek_pid_idx = 0; ek_pid_idx < EK_NUM_DEVICES; ek_pid_idx++)
4646
{
4747
if((info->product_id == ek_pids[ek_pid_idx][EK_PID])
4848
&&(info->interface_number == ek_pids[ek_pid_idx][EK_INTERFACE]))

Controllers/HoltekController/HoltekControllerDetect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void DetectHoltekControllers(std::vector<RGBController*>& rgb_controllers)
3737
{
3838
hid_init();
3939

40-
for(int device_idx = 0; device_idx < HOLTEK_NUM_DEVICES; device_idx++)
40+
for(unsigned int device_idx = 0; device_idx < HOLTEK_NUM_DEVICES; device_idx++)
4141
{
4242
switch(device_list[device_idx].type)
4343
{

Controllers/HyperXMouseController/HyperXPulsefireSurgeController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void HyperXPulsefireSurgeController::SetProfileBrightness
7272
buf[0x03] = 0x01;
7373
buf[0x04] = 0x01;
7474
buf[0x05] = 0x01;
75-
buf[0x06] = 0x64;
75+
buf[0x06] = brightness;
7676

7777
/*-----------------------------------------------------*\
7878
| Send packet |

Controllers/LogitechController/LogitechControllerDetect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void DetectLogitechControllers(std::vector<RGBController*>& rgb_controllers)
9090
{
9191
hid_init();
9292

93-
for(int device_idx = 0; device_idx < LOGITECH_NUM_DEVICES; device_idx++)
93+
for(unsigned int device_idx = 0; device_idx < LOGITECH_NUM_DEVICES; device_idx++)
9494
{
9595
switch(device_list[device_idx].type)
9696
{

Controllers/PolychromeController/PolychromeController.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ PolychromeController::PolychromeController(i2c_smbus_interface* bus, polychrome_
1919

2020
unsigned short fw_version = ReadFirmwareVersion();
2121
unsigned char major_version = fw_version >> 8;
22-
unsigned char minor_version = fw_version & 0xFF;
2322

2423
/*-----------------------------------------------------*\
2524
| Determine whether the device uses ASR LED or |

Controllers/RGBFusion2USBController/RGBFusion2USBControllerDetect.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ void DetectRGBFusion2USBControllers(std::vector<RGBController*> &rgb_controllers
3535
return;
3636
}
3737

38-
for(int dev_idx = 0; dev_idx < COUNT_RGBFUSION2_PIDS; dev_idx++)
38+
for(unsigned int dev_idx = 0; dev_idx < COUNT_RGBFUSION2_PIDS; dev_idx++)
3939
{
4040
dev = NULL;
4141

@@ -54,7 +54,8 @@ void DetectRGBFusion2USBControllers(std::vector<RGBController*> &rgb_controllers
5454
&&(info->product_id == tmpPID))
5555
#endif
5656
{
57-
hid_device * dev = hid_open_path(info->path);
57+
dev = hid_open_path(info->path);
58+
5859
if (dev)
5960
{
6061
RGBFusion2USBController * controller = new RGBFusion2USBController(dev, info->path, MB_info.getMainboard());

Controllers/RedragonController/RedragonControllerDetect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ void DetectRedragonControllers(std::vector<RGBController*>& rgb_controllers)
7373

7474
hid_init();
7575

76-
for(int device_idx = 0; device_idx < REDRAGON_NUM_DEVICES; device_idx++)
76+
for(unsigned int device_idx = 0; device_idx < REDRAGON_NUM_DEVICES; device_idx++)
7777
{
7878
dev = NULL;
7979

Controllers/SteelSeriesController/SteelSeriesApexController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ SteelSeriesApexController::~SteelSeriesApexController()
4545
void SteelSeriesApexController::SetMode
4646
(
4747
unsigned char mode,
48-
std::vector<RGBColor> colors
48+
std::vector<RGBColor> /*colors*/
4949
)
5050
{
5151
unsigned char mode_colors[9];

0 commit comments

Comments
 (0)