diff --git a/Controllers/DRGBController/RGBController_DRGB.cpp b/Controllers/DRGBController/RGBController_DRGB.cpp index 18bbd85e..5248413e 100644 --- a/Controllers/DRGBController/RGBController_DRGB.cpp +++ b/Controllers/DRGBController/RGBController_DRGB.cpp @@ -266,7 +266,7 @@ void RGBController_DRGB::SetupZones() } else if(channel_idx<16) { - snprintf(ch_idx_string, 2, "%d", channel_idx-5 ); + snprintf(ch_idx_string, 3, "%d", channel_idx-5 ); zones[channel_idx].name = "ARGB "; } } diff --git a/Controllers/MSIMysticLightController/MSIMysticLight761Controller/MSIMysticLight761Controller.cpp b/Controllers/MSIMysticLightController/MSIMysticLight761Controller/MSIMysticLight761Controller.cpp index 12b74ce0..0807ba09 100644 --- a/Controllers/MSIMysticLightController/MSIMysticLight761Controller/MSIMysticLight761Controller.cpp +++ b/Controllers/MSIMysticLightController/MSIMysticLight761Controller/MSIMysticLight761Controller.cpp @@ -158,9 +158,8 @@ void init_packet(FeaturePacket_Zone_761 * packet) MSIMysticLight761Controller::MSIMysticLight761Controller ( - hid_device* handle, - const char* path, - unsigned short pid, + hid_device* handle, + const char* path, std::string dev_name ) { @@ -169,7 +168,7 @@ MSIMysticLight761Controller::MSIMysticLight761Controller name = dev_name; const mystic_light_761_config * board_config = nullptr; - for(int i = 0; i < NUM_CONFS; i++) + for(std::size_t i = 0; i < NUM_CONFS; i++) { if(*(board_configs[i].name) == name) { @@ -405,7 +404,7 @@ void MSIMysticLight761Controller::SetZoneColor } } -void set_data_color(FeaturePacket_Zone_761 * packet, int index, unsigned char color_val ) +void set_data_color(FeaturePacket_Zone_761 * packet, std::size_t index, unsigned char color_val ) { if(packet == nullptr) { @@ -417,13 +416,12 @@ void set_data_color(FeaturePacket_Zone_761 * packet, int index, unsigned char co void MSIMysticLight761Controller::SetLedColor ( MSI_ZONE zone, - int index, + std::size_t index, unsigned char red, unsigned char grn, unsigned char blu ) { - FeaturePacket_Zone_761 * ptr = nullptr; switch(zone) { diff --git a/Controllers/MSIMysticLightController/MSIMysticLight761Controller/MSIMysticLight761Controller.h b/Controllers/MSIMysticLightController/MSIMysticLight761Controller/MSIMysticLight761Controller.h index 7c6b8726..c9eab05d 100644 --- a/Controllers/MSIMysticLightController/MSIMysticLight761Controller/MSIMysticLight761Controller.h +++ b/Controllers/MSIMysticLightController/MSIMysticLight761Controller/MSIMysticLight761Controller.h @@ -27,9 +27,8 @@ class MSIMysticLight761Controller public: MSIMysticLight761Controller ( - hid_device* handle, - const char* path, - unsigned short pid, + hid_device* handle, + const char* path, std::string dev_name ); @@ -70,7 +69,7 @@ public: void SetLedColor ( MSI_ZONE zone, - int index, + std::size_t index, unsigned char red, unsigned char grn, unsigned char blu diff --git a/Controllers/MSIMysticLightController/MSIMysticLight761Controller/RGBController_MSIMysticLight761.cpp b/Controllers/MSIMysticLightController/MSIMysticLight761Controller/RGBController_MSIMysticLight761.cpp index 7cc479a8..940082fe 100644 --- a/Controllers/MSIMysticLightController/MSIMysticLight761Controller/RGBController_MSIMysticLight761.cpp +++ b/Controllers/MSIMysticLightController/MSIMysticLight761Controller/RGBController_MSIMysticLight761.cpp @@ -63,7 +63,7 @@ RGBController_MSIMysticLight761::RGBController_MSIMysticLight761 for(std::size_t i = 0; i < supported_zones->size(); ++i) { - for(int j = 0; j < NUMOF_ZONES; ++j) + for(std::size_t j = 0; j < NUMOF_ZONES; ++j) { if(led_zones[j].zone_type == (*supported_zones)[i]) { diff --git a/Controllers/MSIMysticLightController/MSIMysticLightControllerDetect.cpp b/Controllers/MSIMysticLightController/MSIMysticLightControllerDetect.cpp index 917c2082..b566299f 100644 --- a/Controllers/MSIMysticLightController/MSIMysticLightControllerDetect.cpp +++ b/Controllers/MSIMysticLightController/MSIMysticLightControllerDetect.cpp @@ -102,7 +102,7 @@ void DetectMSIMysticLightControllers try { - MSIMysticLight761Controller* controller = new MSIMysticLight761Controller(dev, (const char *) info->path, info->product_id, dmi_name); + MSIMysticLight761Controller* controller = new MSIMysticLight761Controller(dev, (const char *) info->path, dmi_name); RGBController_MSIMysticLight761* rgb_controller = new RGBController_MSIMysticLight761(controller); ResourceManager::get()->RegisterRGBController(rgb_controller); } diff --git a/Controllers/QMKController/QMKVialRGBController/RGBController_QMKVialRGB.cpp b/Controllers/QMKController/QMKVialRGBController/RGBController_QMKVialRGB.cpp index d8e3b5b5..a8a66788 100644 --- a/Controllers/QMKController/QMKVialRGBController/RGBController_QMKVialRGB.cpp +++ b/Controllers/QMKController/QMKVialRGBController/RGBController_QMKVialRGB.cpp @@ -220,7 +220,7 @@ void RGBController_QMKVialRGB::SetupZones() SetupColors(); } -void RGBController_QMKVialRGB::ResizeZone(int zone, int new_size) +void RGBController_QMKVialRGB::ResizeZone(int /*zone*/, int /*new_size*/) { } diff --git a/Controllers/RazerController/RazerKrakenV4Controller/RazerKrakenV4Controller.cpp b/Controllers/RazerController/RazerKrakenV4Controller/RazerKrakenV4Controller.cpp index 313364b1..133d9708 100644 --- a/Controllers/RazerController/RazerKrakenV4Controller/RazerKrakenV4Controller.cpp +++ b/Controllers/RazerController/RazerKrakenV4Controller/RazerKrakenV4Controller.cpp @@ -120,7 +120,6 @@ unsigned char RazerKrakenV4Controller::GetMaxBrightness() void RazerKrakenV4Controller::SetDirect(RGBColor* colors) { struct razer_kraken_v4_report report = razer_kraken_v4_create_report(0x0F, 0x03, (5 + (3 * device_list[device_index]->cols))); - struct razer_kraken_v4_report response_report = razer_kraken_v4_create_response(); report.arguments[2] = 0; report.arguments[3] = 0; @@ -139,7 +138,6 @@ void RazerKrakenV4Controller::SetDirect(RGBColor* colors) void RazerKrakenV4Controller::SetBrightness(unsigned char brightness) { struct razer_kraken_v4_report report = razer_kraken_v4_create_report(0x00, 0x00, 0x05); - struct razer_kraken_v4_report response_report = razer_kraken_v4_create_response(); report.arguments[0] = RAZER_KRAKEN_V4_CMD_LIGHTING_SET_BRIGHTNESS; report.arguments[2] = 0x01; @@ -151,7 +149,6 @@ void RazerKrakenV4Controller::SetBrightness(unsigned char brightness) void RazerKrakenV4Controller::SetModeWave() { struct razer_kraken_v4_report report = razer_kraken_v4_create_report(0x00, 0x00, 0x05); - struct razer_kraken_v4_report response_report = razer_kraken_v4_create_response(); report.arguments[0] = RAZER_KRAKEN_V4_CMD_LIGHTING_SET_MODE; report.arguments[2] = 0x01;