Fix more warnings

This commit is contained in:
Adam Honse
2025-12-16 11:30:24 -06:00
parent 56b75aaffc
commit 68194928ca
2 changed files with 9 additions and 16 deletions

View File

@@ -256,12 +256,12 @@ void RGBController_DRGB::SetupZones()
{
if(channel_idx<4)
{
snprintf(ch_idx_string, 2, "%d", channel_idx+1 );
snprintf(ch_idx_string, 3, "%d", channel_idx+1 );
zones[channel_idx].name = "LCD ";
}
else if(channel_idx<6)
{
snprintf(ch_idx_string, 2, "%d", channel_idx+1 );
snprintf(ch_idx_string, 3, "%d", channel_idx+1 );
zones[channel_idx].name = "LED ";
}
else if(channel_idx<16)
@@ -272,7 +272,7 @@ void RGBController_DRGB::SetupZones()
}
else if(channel_idx<8)
{
snprintf(ch_idx_string, 2, "%d", channel_idx + 1);
snprintf(ch_idx_string, 3, "%d", channel_idx + 1);
zones[channel_idx].name = "Channel A";
}
else if(channel_idx<16)

View File

@@ -69,7 +69,6 @@ static const mystic_light_761_config board_configs[] =
{ &(board_names[7]), 0, 0, 0, 1, &zone_set1, MSIMysticLight761Controller::DIRECT_MODE_ZONE_BASED }, // MSI Z890 GAMING PLUS WIFI
};
enum MSI_ZONE setup_map [] =
{
MSI_ZONE_JARGB_1,
@@ -105,7 +104,6 @@ int get_zone_setup_index(MSI_ZONE index)
return -1;
}
// Copying from signal plugin
// DO NOT MODIFY THIS ARRAY DIRECTLY, MAKE COPY
unsigned char initial_setup_array[] =
@@ -352,7 +350,6 @@ bool MSIMysticLight761Controller::Update
bool /*save*/
)
{
int ret = 0;
bool flag = true;
ret = hid_send_feature_report(dev, GET_CHAR_PTR_REF(data->jaf.packet) , sizeof(FeaturePacket_PerLED_761));
@@ -441,18 +438,14 @@ void MSIMysticLight761Controller::SetLedColor
break;
}
if(index >= 0)
std::size_t candidate_index = (index * 3);
if((candidate_index + 2) <= GetMaxDirectLeds(zone))
{
int candidate_index = (index * 3);
if((candidate_index + 2) <= GetMaxDirectLeds(zone))
{
set_data_color(ptr, candidate_index, red);
set_data_color(ptr, candidate_index + 1, grn);
set_data_color(ptr, candidate_index + 2, blu);
}
set_data_color(ptr, candidate_index, red);
set_data_color(ptr, candidate_index + 1, grn);
set_data_color(ptr, candidate_index + 2, blu);
}
}
ZoneData *MSIMysticLight761Controller::GetZoneData