From 1cfd60261e0ba83bf824d512b7d436936013345e Mon Sep 17 00:00:00 2001 From: Cooper Hall Date: Thu, 6 Jul 2023 23:39:19 +0000 Subject: [PATCH] Fixed all the warnings I could --- .../LianLiUniHub_AL10Controller.cpp | 28 +++++++++---------- .../NollieController/NollieController.cpp | 2 +- .../NollieController/RGBController_Nollie.cpp | 2 +- .../OKSController/OKSKeyboardController.cpp | 4 +-- .../RGBController_OKSKeyboard.cpp | 4 +-- .../PalitGPUControllerDetect.cpp | 2 +- .../SRGBmodsLEDControllerV1.cpp | 2 +- .../RGBController_ZotacV2GPU.cpp | 2 +- 8 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Controllers/LianLiController/LianLiUniHub_AL10Controller.cpp b/Controllers/LianLiController/LianLiUniHub_AL10Controller.cpp index 1aa1ee65..79e2a819 100644 --- a/Controllers/LianLiController/LianLiUniHub_AL10Controller.cpp +++ b/Controllers/LianLiController/LianLiUniHub_AL10Controller.cpp @@ -580,17 +580,17 @@ void LianLiUniHub_AL10Controller::Synchronize() \*--------------------------------------------------------------------*/ // uint8_t control = 0; -// /*-------------------------------------*\ -// | Configure fan settings | -// \*-------------------------------------*/ + /*-------------------------------------*\ + | Configure fan settings | + \*-------------------------------------*/ // for(const Channel& channel : channels) // { // if(channel.fanSpeed == UNIHUB_AL10_FAN_SPEED_PWM) // { -// /*-----------------------------*\ -// | Configure the fan to pwm | -// | control | -// \*-----------------------------*/ + /*-----------------------------*\ + | Configure the fan to pwm | + | control | + \*-----------------------------*/ // uint8_t config_pwm[1] = { 0x00 }; // control |= (0x01 << channel.index); @@ -600,10 +600,10 @@ void LianLiUniHub_AL10Controller::Synchronize() // } // else // { -// /*-----------------------------*\ -// | Configure the fan to hub | -// | control and set speed | -// \*-----------------------------*/ + /*-----------------------------*\ + | Configure the fan to hub | + | control and set speed | + \*-----------------------------*/ // uint8_t config_hub[2] = { (uint8_t)(channel.fanSpeed >> 0x08), (uint8_t)(channel.fanSpeed & 0xFF) }; // SendConfig(channel.fanHubActionAddress, config_hub, sizeof(config_hub)); @@ -611,9 +611,9 @@ void LianLiUniHub_AL10Controller::Synchronize() // } // } -// /*-------------------------------------*\ -// | Configure fan control modes | -// \*-------------------------------------*/ + /*-------------------------------------*\ + | Configure fan control modes | + \*-------------------------------------*/ // uint8_t config_fan_mode[2] = { 0x31, (uint8_t)(0xF0 | control) }; // SendConfig(UNIHUB_AL10_ACTION_ADDRESS, config_fan_mode, sizeof(config_fan_mode)); diff --git a/Controllers/NollieController/NollieController.cpp b/Controllers/NollieController/NollieController.cpp index be911af0..1a615768 100644 --- a/Controllers/NollieController/NollieController.cpp +++ b/Controllers/NollieController/NollieController.cpp @@ -11,7 +11,7 @@ using namespace std::chrono_literals; -NollieController::NollieController(hid_device* dev_handle, const char* path, unsigned short pid) +NollieController::NollieController(hid_device* dev_handle, const char* path, unsigned short /*pid*/) { dev = dev_handle; location = path; diff --git a/Controllers/NollieController/RGBController_Nollie.cpp b/Controllers/NollieController/RGBController_Nollie.cpp index 7d0f1ea6..03c43ce9 100644 --- a/Controllers/NollieController/RGBController_Nollie.cpp +++ b/Controllers/NollieController/RGBController_Nollie.cpp @@ -152,7 +152,7 @@ void RGBController_Nollie::DeviceUpdateLEDs() } } std::sort(ChSort.begin(), ChSort.end()); - for (int i = 0; i < ChSort.size(); i++) + for (std::size_t i = 0; i < ChSort.size(); i++) { int* ptr = std::find(channel_index, channel_index + 32, ChSort[i]); int zone_idx = ptr - channel_index; diff --git a/Controllers/OKSController/OKSKeyboardController.cpp b/Controllers/OKSController/OKSKeyboardController.cpp index 088dfea4..f5819bb2 100644 --- a/Controllers/OKSController/OKSKeyboardController.cpp +++ b/Controllers/OKSController/OKSKeyboardController.cpp @@ -50,7 +50,7 @@ unsigned short OKSKeyboardController::GetUSBPID() return(usb_pid); } -void OKSKeyboardController::SendColors(unsigned char* color_data, unsigned int color_data_size) +void OKSKeyboardController::SendColors(unsigned char* color_data, unsigned int /*color_data_size*/) { char usb_buf[65]; union kb2_port_t Pack; @@ -86,7 +86,7 @@ void OKSKeyboardController::SendColors(unsigned char* color_data, unsigned int c std::this_thread::sleep_for(std::chrono::milliseconds(5)); } -void OKSKeyboardController::SendKeyboardModeEx(const mode &m, unsigned char red, unsigned char green, unsigned char blue) +void OKSKeyboardController::SendKeyboardModeEx(const mode &m, unsigned char /*red*/, unsigned char /*green*/, unsigned char /*blue*/) { union kb2_port_t Pack; kb2M_wrgb(&Pack, m.brightness, m.value, m.speed, m.direction); diff --git a/Controllers/OKSController/RGBController_OKSKeyboard.cpp b/Controllers/OKSController/RGBController_OKSKeyboard.cpp index e1bc2cd9..844b894a 100644 --- a/Controllers/OKSController/RGBController_OKSKeyboard.cpp +++ b/Controllers/OKSController/RGBController_OKSKeyboard.cpp @@ -269,7 +269,7 @@ void RGBController_OKSKeyboard::DeviceUpdateLEDs() controller->SendColors(colordata, colors.size()*3); } -void RGBController_OKSKeyboard::UpdateZoneLEDs(int zone) +void RGBController_OKSKeyboard::UpdateZoneLEDs(int /*zone*/) { DeviceUpdateLEDs(); } @@ -290,7 +290,7 @@ void RGBController_OKSKeyboard::DeviceUpdateMode() unsigned char red = 0x00; unsigned char grn = 0x00; unsigned char blu = 0x00; - unsigned char random = (modes[active_mode].color_mode == MODE_COLORS_RANDOM); + //unsigned char random = (modes[active_mode].color_mode == MODE_COLORS_RANDOM); if(modes[active_mode].colors.size() > 0) { diff --git a/Controllers/PalitGPUController/PalitGPUControllerDetect.cpp b/Controllers/PalitGPUController/PalitGPUControllerDetect.cpp index 1cd0ee2e..a6b44f7a 100644 --- a/Controllers/PalitGPUController/PalitGPUControllerDetect.cpp +++ b/Controllers/PalitGPUController/PalitGPUControllerDetect.cpp @@ -28,7 +28,7 @@ void DetectPalitGPUControllers(i2c_smbus_interface* bus, uint8_t i2c_addr, const } const uint8_t palit[] = {'P', 'A', 'L', 'I', 'T'}; - for (int i = 0; i < sizeof(palit); i++) + for (size_t i = 0; i < sizeof(palit); i++) { int32_t letter = bus->i2c_smbus_read_byte_data(i2c_addr, 0x07 + i); if (palit[i] != letter) diff --git a/Controllers/SRGBmodsController/SRGBmodsLEDControllerV1.cpp b/Controllers/SRGBmodsController/SRGBmodsLEDControllerV1.cpp index 9e88fdcf..478713ec 100644 --- a/Controllers/SRGBmodsController/SRGBmodsLEDControllerV1.cpp +++ b/Controllers/SRGBmodsController/SRGBmodsLEDControllerV1.cpp @@ -43,7 +43,7 @@ std::string SRGBmodsLEDControllerV1::GetSerialString() return(return_string); } -void SRGBmodsLEDControllerV1::SetChannelLEDs(unsigned char channel, RGBColor* colors, unsigned int num_colors) +void SRGBmodsLEDControllerV1::SetChannelLEDs(unsigned char /*channel*/, RGBColor* colors, unsigned int num_colors) { /*-----------------------------------------------------*\ | Determine number of packets to send | diff --git a/Controllers/ZotacV2GPUController/RGBController_ZotacV2GPU.cpp b/Controllers/ZotacV2GPUController/RGBController_ZotacV2GPU.cpp index 9a93ae2c..8352ceb4 100644 --- a/Controllers/ZotacV2GPUController/RGBController_ZotacV2GPU.cpp +++ b/Controllers/ZotacV2GPUController/RGBController_ZotacV2GPU.cpp @@ -408,7 +408,7 @@ void RGBController_ZotacV2GPU::DeviceUpdateMode() if(zoneConfig.mode == ZOTAC_V2_GPU_MODE_DUET) { zoneConfig.colorPreset = ZOTAC_V2_GPU_DUET_PRESETS.size(); // custom - for(int i = 0; i < ZOTAC_V2_GPU_DUET_PRESETS.size(); ++i) + for(size_t i = 0; i < ZOTAC_V2_GPU_DUET_PRESETS.size(); ++i) { if(zoneConfig.color1 == ZOTAC_V2_GPU_DUET_PRESETS[i].first && zoneConfig.color2 == ZOTAC_V2_GPU_DUET_PRESETS[i].second)