Fixed all the warnings I could

This commit is contained in:
Cooper Hall 2023-07-06 23:39:19 +00:00 committed by Adam Honse
parent 75fd43c131
commit 1cfd60261e
8 changed files with 23 additions and 23 deletions

View file

@ -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));

View file

@ -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;

View file

@ -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;

View file

@ -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);

View file

@ -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)
{

View file

@ -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)

View file

@ -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 |

View file

@ -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)