Fixed some warnings
This commit is contained in:
parent
b0b20b9f06
commit
45be4329c5
10 changed files with 29 additions and 31 deletions
|
|
@ -262,7 +262,7 @@ void PolychromeUSBController::WriteZone
|
|||
|
||||
void PolychromeUSBController::WriteAllZones
|
||||
(
|
||||
const std::vector<PolychromeZoneInfo>& zones_info,
|
||||
const std::vector<PolychromeZoneInfo>& /*zones_info*/,
|
||||
const std::vector<zone>& zones
|
||||
)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ void RGBController_AuraMouse::DeviceUpdateLEDs()
|
|||
}
|
||||
}
|
||||
|
||||
void RGBController_AuraMouse::UpdateZoneLEDs(int zone)
|
||||
void RGBController_AuraMouse::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -429,7 +429,7 @@ void RGBController_AuraTUFKeyboard::DeviceUpdateLEDs()
|
|||
{
|
||||
std::vector<led_color> led_color_list = {};
|
||||
|
||||
for(int i = 0; i < colors.size(); i++)
|
||||
for(size_t i = 0; i < colors.size(); i++)
|
||||
{
|
||||
led_color_list.push_back({ leds[i].value, colors[i] });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ void HyperXQuadcastSController::SaveColors(std::vector<RGBColor> colors, unsigne
|
|||
unsigned int num_color_packets = 0;
|
||||
unsigned int frame = 0;
|
||||
unsigned char color[HYPERX_QUADCAST_S_PACKET_SIZE] = {0};
|
||||
unsigned char empty[HYPERX_QUADCAST_S_PACKET_SIZE] = {0};
|
||||
|
||||
num_color_packets = num_frames/8;
|
||||
if(num_frames % 8)
|
||||
|
|
@ -137,7 +136,6 @@ void HyperXQuadcastSController::SendDirect(std::vector<RGBColor> colors)
|
|||
return;
|
||||
}
|
||||
|
||||
int res;
|
||||
RGBColor c1 = colors[0];
|
||||
RGBColor c2 = colors[1];
|
||||
uint8_t buffer[HYPERX_QUADCAST_S_PACKET_SIZE];
|
||||
|
|
@ -158,7 +156,7 @@ void HyperXQuadcastSController::SendDirect(std::vector<RGBColor> colors)
|
|||
|
||||
lock.lock();
|
||||
|
||||
res = wrapper.hid_send_feature_report(dev, buffer, HYPERX_QUADCAST_S_PACKET_SIZE);
|
||||
wrapper.hid_send_feature_report(dev, buffer, HYPERX_QUADCAST_S_PACKET_SIZE);
|
||||
std::this_thread::sleep_for(15ms);
|
||||
|
||||
SendToRegister(0xF2, 0, 1);
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ void IonicoController::SetColors(int device, std::vector<RGBColor> array_colors,
|
|||
{
|
||||
uint8_t usb_buf[IONICO_REPORT_SIZE];
|
||||
memset(usb_buf, 0x00, IONICO_REPORT_SIZE);
|
||||
for(int i = 0; i < array_colors.size(); i++)
|
||||
for(size_t i = 0; i < array_colors.size(); i++)
|
||||
{
|
||||
usb_buf[1] = IONICO_DIRECT_CMD;
|
||||
usb_buf[3] = i+1;
|
||||
|
|
@ -96,7 +96,7 @@ void IonicoController::SetColors(int device, std::vector<RGBColor> array_colors,
|
|||
uint8_t usb_buf_led[IONICO_DIRECT_REPORT_SIZE];
|
||||
memset(usb_buf_led, 0x00, IONICO_DIRECT_REPORT_SIZE);
|
||||
|
||||
for(int i = 0; i < array_colors.size(); i++)
|
||||
for(size_t i = 0; i < array_colors.size(); i++)
|
||||
{
|
||||
usb_buf_led[1 + 3 * i] = RGBGetRValue(array_colors[i]);
|
||||
usb_buf_led[2 + 3 * i] = RGBGetBValue(array_colors[i]);
|
||||
|
|
|
|||
|
|
@ -143,7 +143,7 @@ void RGBController_Ionico::SetupZones()
|
|||
zone_keyboard.leds_count = leds.size();
|
||||
zone_keyboard.matrix_map = nullptr;
|
||||
zones.emplace_back(zone_keyboard);
|
||||
for(int i = 0; i < leds.size(); ++i)
|
||||
for(size_t i = 0; i < leds.size(); ++i)
|
||||
{
|
||||
leds[i].name = "Keyboard Zone " + std::to_string(i+1);
|
||||
}
|
||||
|
|
@ -159,7 +159,7 @@ void RGBController_Ionico::SetupZones()
|
|||
zone_bar.leds_count = leds.size();
|
||||
zone_bar.matrix_map = nullptr;
|
||||
zones.emplace_back(zone_bar);
|
||||
for(int i = 0; i < leds.size(); ++i)
|
||||
for(size_t i = 0; i < leds.size(); ++i)
|
||||
{
|
||||
leds[i].name = "Bar Led " + std::to_string(i+1);
|
||||
}
|
||||
|
|
@ -187,12 +187,12 @@ void RGBController_Ionico::DeviceSaveMode()
|
|||
controller->SaveBios();
|
||||
}
|
||||
|
||||
void RGBController_Ionico::UpdateZoneLEDs(int zone)
|
||||
void RGBController_Ionico::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_Ionico::UpdateSingleLED(int led)
|
||||
void RGBController_Ionico::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
|
|
|||
|
|
@ -741,7 +741,7 @@ void RGBController_MountainKeyboard::DeviceUpdate(const mode& current_mode)
|
|||
unsigned char color_data[MOUNTAIN_KEYBOARD_TRANSFER_BUFFER_SIZE] = {0};
|
||||
unsigned char color_edge_data[MOUNTAIN_KEYBOARD_TRANSFER_EDGE_BUFFER_SIZE] = {0};
|
||||
|
||||
for(int led_idx = 0; led_idx < colors.size(); led_idx++)
|
||||
for(unsigned int led_idx = 0; led_idx < colors.size(); led_idx++)
|
||||
{
|
||||
if(led_idx < zones[0].leds_count)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ unsigned char * RGBController::GetDeviceDescription(unsigned int protocol_versio
|
|||
\*---------------------------------------------------------*/
|
||||
data_size += sizeof(unsigned short);
|
||||
|
||||
for(int segment_index = 0; segment_index < zones[zone_index].segments.size(); segment_index++)
|
||||
for(size_t segment_index = 0; segment_index < zones[zone_index].segments.size(); segment_index++)
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Length of segment name string |
|
||||
|
|
|
|||
|
|
@ -1264,7 +1264,7 @@ void ResourceManager::DetectDevicesThreadFunction()
|
|||
| Load the libhidapi-libusb library |
|
||||
\*-------------------------------------------------*/
|
||||
#ifdef __GLIBC__
|
||||
if(dyn_handle = dlopen("libhidapi-libusb.so", RTLD_NOW | RTLD_NODELETE | RTLD_DEEPBIND))
|
||||
if((dyn_handle = dlopen("libhidapi-libusb.so", RTLD_NOW | RTLD_NODELETE | RTLD_DEEPBIND)))
|
||||
#else
|
||||
if(dyn_handle = dlopen("libhidapi-libusb.so", RTLD_NOW | RTLD_NODELETE ))
|
||||
#endif
|
||||
|
|
|
|||
2
cli.cpp
2
cli.cpp
|
|
@ -1046,7 +1046,7 @@ void ApplyOptions(DeviceOptions& options, std::vector<RGBController *>& rgb_cont
|
|||
| supports that colour mode then swich to it before |
|
||||
| evaluating if a colour needs to be set |
|
||||
\*---------------------------------------------------------*/
|
||||
if((options.brightness >= 0) && (device->modes[mode].flags & MODE_FLAG_HAS_BRIGHTNESS))
|
||||
if((device->modes[mode].flags & MODE_FLAG_HAS_BRIGHTNESS))
|
||||
{
|
||||
unsigned int new_brightness = device->modes[mode].brightness_max - device->modes[mode].brightness_min;
|
||||
new_brightness *= options.brightness;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue