Fix more warnings

master
Adam Honse 5 months ago
parent 56b75aaffc
commit 68194928ca

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

@ -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)
{
int candidate_index = (index * 3);
std::size_t 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);
}
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);
}
}
ZoneData *MSIMysticLight761Controller::GetZoneData

Loading…
Cancel
Save