Skip to content

Commit b8f4b08

Browse files
Fix more warnings
1 parent 25d7ea3 commit b8f4b08

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

Controllers/AsusAuraUSBController/AsusAuraMousematController.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ std::string AuraMousematController::GetVersion()
5555
unsigned char usb_buf_out[65];
5656
hid_read(dev, usb_buf_out, 65);
5757

58-
char version[8];
59-
snprintf(version, 8, "%X.%02X.%02X", usb_buf_out[6], usb_buf_out[7], usb_buf_out[8]);
58+
char version[9];
59+
snprintf(version, 9, "%X.%02X.%02X", usb_buf_out[6], usb_buf_out[7], usb_buf_out[8]);
6060
return std::string(version);
6161
}
6262

@@ -116,7 +116,7 @@ void AuraMousematController::UpdateDevice
116116
usb_buf[0x0b + i * 3] = RGBGetGValue(colors[i]);
117117
usb_buf[0x0c + i * 3] = RGBGetBValue(colors[i]);
118118
}
119-
119+
120120
hid_write(dev, usb_buf, 65);
121121
}
122122

Controllers/AsusAuraUSBController/AsusROGAllyController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ void ROGAllyController::UpdateDevice
7676
unsigned char mode,
7777
std::vector<RGBColor> colors,
7878
unsigned char speed,
79-
unsigned char brightness,
79+
unsigned char /*brightness*/,
8080
unsigned char direction
8181
)
8282
{

Controllers/EpomakerController/RGBController_EpomakerController.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,12 +400,12 @@ void RGBController_EpomakerController::ResizeZone(int /*zone*/, int /*new_size*/
400400
\*---------------------------------------------------------*/
401401
}
402402

403-
void RGBController_EpomakerController::UpdateZoneLEDs(int zone)
403+
void RGBController_EpomakerController::UpdateZoneLEDs(int /*zone*/)
404404
{
405405
DeviceUpdateLEDs();
406406
}
407407

408-
void RGBController_EpomakerController::UpdateSingleLED(int led)
408+
void RGBController_EpomakerController::UpdateSingleLED(int /*led*/)
409409
{
410410
DeviceUpdateLEDs();
411411
}

Controllers/GaiZongGaiKeyboardController/GaiZhongGaiController.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,15 +251,21 @@ void GaiZhongGaiKeyboardController::SendColors
251251
for(uint8_t i = 0; i < 32; i++) //Maximum up to 640 RGB LED
252252
{
253253
if(i > color_data_size / 60)
254+
{
254255
break;
256+
}
255257

256258
usb_buf[1] = i;
257259
for(uint8_t j = 0; j < 60; j++ )
258260
{
259-
if(i * 60 + j < color_data_size)
261+
if((unsigned int)(i * 60 + j) < color_data_size)
262+
{
260263
usb_buf[j + 2] = color_data[i * 60 + j];
264+
}
261265
else
266+
{
262267
usb_buf[j + 2] = 0; //Redundant data set 0
268+
}
263269
}
264270
hid_write(dev, usb_buf, 65);
265271
}

Controllers/KasaSmartController/KasaSmartController.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void KasaSmartController::SetColor(unsigned char red, unsigned char green, unsig
161161
| Normalize case where hue is "-1" undefined |
162162
\*------------------------------------------*/
163163
unsigned int normalized_hue = hsv.hue;
164-
if(hsv.hue == (int)-1)
164+
if(hsv.hue == (unsigned int)-1)
165165
{
166166
normalized_hue = 0;
167167
}

0 commit comments

Comments
 (0)