Fix warnings in JGINYUE V2 controller

This commit is contained in:
Adam Honse 2024-11-25 19:48:01 -06:00
parent 69512cbf70
commit b0ba64f178
2 changed files with 11 additions and 11 deletions

View file

@ -169,7 +169,7 @@ void JGINYUEInternalUSBV2Controller::WriteZoneMode
{
unsigned char usb_buf[64];
memset(usb_buf, 0x00, sizeof(usb_buf));
unsigned char num_color = rgb.size();
unsigned char num_color = (unsigned char)rgb.size();
num_color = (num_color < 8) ? num_color : 8;
usb_buf[0] = JGINYUE_V2_HID_GENERAL_COMMAND_HEADER;

View file

@ -423,7 +423,7 @@ void RGBController_JGINYUEInternalUSBV2::DeviceUpdateMode()
return;
}
unsigned char Area_num = 0;
unsigned int Area_num = 0;
if(controller->support_Global_zone == true)
{
Area_num = controller->GetZoneCount() - 1;
@ -432,9 +432,9 @@ void RGBController_JGINYUEInternalUSBV2::DeviceUpdateMode()
{
Area_num = controller->GetZoneCount();
}
for(size_t i = 0; i < Area_num; i++)
for(unsigned int i = 0; i < Area_num; i++)
{
DeviceUpdateZoneMode(i);
DeviceUpdateZoneMode((int)i);
}
}