Fix a bunch of compiler warnings
This commit is contained in:
parent
be10133bce
commit
bba7fa9fd2
40 changed files with 130 additions and 124 deletions
|
|
@ -31,13 +31,11 @@ enum
|
|||
|
||||
void DetectLenovoLegionUSBControllers(hid_device_info* info, const std::string& name)
|
||||
{
|
||||
static const char* controller_name = "Lenovo Legion Laptop";
|
||||
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
if(dev)
|
||||
{
|
||||
LenovoUSBController* controller = new LenovoUSBController(dev, info->path, info->product_id);
|
||||
LenovoUSBController* controller = new LenovoUSBController(dev, info->path, info->product_id);
|
||||
RGBController_LenovoUSB* rgb_controller = new RGBController_LenovoUSB(controller);
|
||||
rgb_controller->name = name;
|
||||
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ void RGBController_LenovoUSB::SetupZones()
|
|||
break;
|
||||
}
|
||||
|
||||
for(int i = 0; i < lenovo_zones.size(); i++)
|
||||
for(unsigned int i = 0; i < lenovo_zones.size(); i++)
|
||||
{
|
||||
zone new_zone;
|
||||
new_zone.name = lenovo_zones[i].name;
|
||||
|
|
@ -264,7 +264,7 @@ void RGBController_LenovoUSB::ResizeZone(int /*zone*/, int /*new_size*/)
|
|||
|
||||
void RGBController_LenovoUSB::UpdateSingleLED(int led)
|
||||
{
|
||||
if(led != NA)
|
||||
if(led != (int)NA)
|
||||
{
|
||||
controller->setSingleLED(lenovo_leds[led].zone_num, lenovo_leds[led].led_num, colors[led]);
|
||||
}
|
||||
|
|
@ -275,7 +275,7 @@ void RGBController_LenovoUSB::UpdateZoneLEDs(int zone)
|
|||
uint8_t device_zone = lenovo_leds[zones[zone].start_idx].zone_num;
|
||||
vector<pair<uint8_t, RGBColor>> color_map;
|
||||
|
||||
for(int i = 0; i < zones[zone].leds_count; i++)
|
||||
for(unsigned int i = 0; i < zones[zone].leds_count; i++)
|
||||
{
|
||||
int index = zones[zone].start_idx+i;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue