Fix a bunch of warnings
This commit is contained in:
parent
37d58ee1a6
commit
5616f547e4
21 changed files with 32 additions and 42 deletions
|
|
@ -20,7 +20,7 @@
|
|||
#define ASROCK_MOTHERBOARD_1_PID 0x01A2
|
||||
#define ASROCK_DESKMINI_ADDRESSABLE_LED_STRIP_PID 0x01A6
|
||||
|
||||
void DetectPolychromeUSBControllers(hid_device_info* info, const std::string& name)
|
||||
void DetectPolychromeUSBControllers(hid_device_info* info, const std::string& /*name*/)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
|
|
@ -33,4 +33,4 @@ void DetectPolychromeUSBControllers(hid_device_info* info, const std::string& na
|
|||
}
|
||||
|
||||
REGISTER_HID_DETECTOR("ASRock Polychrome USB", DetectPolychromeUSBControllers, ASROCK_VID, ASROCK_MOTHERBOARD_1_PID);
|
||||
REGISTER_HID_DETECTOR("ASRock Deskmini Addressable LED Strip", DetectPolychromeUSBControllers, ASROCK_VID, ASROCK_DESKMINI_ADDRESSABLE_LED_STRIP_PID);
|
||||
REGISTER_HID_DETECTOR("ASRock Deskmini Addressable LED Strip", DetectPolychromeUSBControllers, ASROCK_VID, ASROCK_DESKMINI_ADDRESSABLE_LED_STRIP_PID);
|
||||
|
|
|
|||
|
|
@ -171,16 +171,6 @@ RGBController_PolychromeUSB::RGBController_PolychromeUSB(PolychromeUSBController
|
|||
|
||||
void RGBController_PolychromeUSB::SetupZones()
|
||||
{
|
||||
/*-------------------------------------------------*\
|
||||
| Only set LED count on the first run |
|
||||
\*-------------------------------------------------*/
|
||||
bool first_run = false;
|
||||
|
||||
if(zones.size() == 0)
|
||||
{
|
||||
first_run = true;
|
||||
}
|
||||
|
||||
/*-------------------------------------------------*\
|
||||
| Clear any existing color/LED configuration |
|
||||
\*-------------------------------------------------*/
|
||||
|
|
@ -191,7 +181,6 @@ void RGBController_PolychromeUSB::SetupZones()
|
|||
/*-------------------------------------------------*\
|
||||
| Set zones and leds |
|
||||
\*-------------------------------------------------*/
|
||||
int addressableCounter = 1;
|
||||
for(unsigned int channel_idx = 0; channel_idx < zones.size(); channel_idx++)
|
||||
{
|
||||
PolychromeDeviceInfo device_info = polychrome->GetPolychromeDevices()[channel_idx];
|
||||
|
|
@ -316,7 +305,6 @@ void RGBController_PolychromeUSB::UpdateSingleLED(int led)
|
|||
unsigned char RGBController_PolychromeUSB::GetDeviceMode(unsigned char zone)
|
||||
{
|
||||
int dev_mode;
|
||||
int color_mode = MODE_COLORS_PER_LED;
|
||||
|
||||
dev_mode = polychrome->GetZoneConfig(zone).mode;
|
||||
active_mode = dev_mode;
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ void AuraMainboardController::SendEffect
|
|||
|
||||
void AuraMainboardController::SendColor
|
||||
(
|
||||
unsigned char channel,
|
||||
unsigned char /*channel*/,
|
||||
unsigned char start_led,
|
||||
unsigned char led_count,
|
||||
unsigned char* led_data
|
||||
|
|
@ -196,4 +196,4 @@ void AuraMainboardController::SendCommit()
|
|||
| Send packet |
|
||||
\*-----------------------------------------------------*/
|
||||
hid_write(dev, usb_buf, 65);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ void CMARGBController::SetLedsDirect(RGBColor *led_colours, unsigned int led_cou
|
|||
/*---------------------------------------------*\
|
||||
| Set up the RGB triplets to send |
|
||||
\*---------------------------------------------*/
|
||||
for(int i = 0; i < led_count; i++)
|
||||
for(unsigned int i = 0; i < led_count; i++)
|
||||
{
|
||||
RGBColor colour = led_colours[i];
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ RGBController_CMMP750Controller::~RGBController_CMMP750Controller()
|
|||
int RGBController_CMMP750Controller::GetDeviceMode()
|
||||
{
|
||||
int temp_mode = cmmp750->GetMode();
|
||||
for( int i = 0; i < modes.size(); i++)
|
||||
for(unsigned int i = 0; i < modes.size(); i++)
|
||||
{
|
||||
if (temp_mode == modes[i].value)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -124,6 +124,8 @@ int RGBController_EVGAGPUv2::getModeIndex(unsigned char mode_value)
|
|||
return mode_index;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void RGBController_EVGAGPUv2::SetupZones()
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectEVisionKeyboards(hid_device_info* info, const std::string& name)
|
||||
void DetectEVisionKeyboards(hid_device_info* info, const std::string& /*name*/)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
if( dev )
|
||||
|
|
@ -43,4 +43,4 @@ REGISTER_HID_DETECTOR_IP("EVision Keyboard 0C45:5204", DetectEVisionKeyboards,
|
|||
REGISTER_HID_DETECTOR_IP("EVision Keyboard 0C45:5104", DetectEVisionKeyboards, EVISION_KEYBOARD_VID, REDRAGON_K552_PID, 1, EVISION_KEYBOARD_USAGE_PAGE);
|
||||
REGISTER_HID_DETECTOR_IP("EVision Keyboard 0C45:5004", DetectEVisionKeyboards, EVISION_KEYBOARD_VID, REDRAGON_K556_PID, 1, EVISION_KEYBOARD_USAGE_PAGE);
|
||||
REGISTER_HID_DETECTOR_IP("EVision Keyboard 0C45:652F", DetectEVisionKeyboards, EVISION_KEYBOARD_VID, TECWARE_PHANTOM_ELITE_PID, 1, EVISION_KEYBOARD_USAGE_PAGE);
|
||||
REGISTER_HID_DETECTOR_IP("EVision Keyboard 0C45:8520", DetectEVisionKeyboards, EVISION_KEYBOARD_VID, WARRIOR_KANE_TC235, 1, EVISION_KEYBOARD_USAGE_PAGE);
|
||||
REGISTER_HID_DETECTOR_IP("EVision Keyboard 0C45:8520", DetectEVisionKeyboards, EVISION_KEYBOARD_VID, WARRIOR_KANE_TC235, 1, EVISION_KEYBOARD_USAGE_PAGE);
|
||||
|
|
|
|||
|
|
@ -118,12 +118,12 @@ void RGBController_LogitechG560::DeviceUpdateLEDs()
|
|||
}
|
||||
}
|
||||
|
||||
void RGBController_LogitechG560::UpdateZoneLEDs(int zone)
|
||||
void RGBController_LogitechG560::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_LogitechG560::UpdateSingleLED(int led)
|
||||
void RGBController_LogitechG560::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectMSIMysticLight162Controllers(hid_device_info* info, const std::string& name)
|
||||
void DetectMSIMysticLight162Controllers(hid_device_info* info, const std::string& /*name*/)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
|
|
@ -44,7 +44,7 @@ void DetectMSIMysticLight162Controllers(hid_device_info* info, const std::string
|
|||
* *
|
||||
\******************************************************************************************/
|
||||
|
||||
void DetectMSIMysticLight185Controllers(hid_device_info* info, const std::string& name)
|
||||
void DetectMSIMysticLight185Controllers(hid_device_info* info, const std::string& /*name*/)
|
||||
{
|
||||
hid_device* dev = hid_open_path(info->path);
|
||||
|
||||
|
|
|
|||
|
|
@ -182,12 +182,12 @@ void RGBController_Razer::DeviceUpdateLEDs()
|
|||
controller->SetLEDs(&colors[0]);
|
||||
}
|
||||
|
||||
void RGBController_Razer::UpdateZoneLEDs(int zone)
|
||||
void RGBController_Razer::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_Razer::UpdateSingleLED(int led)
|
||||
void RGBController_Razer::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -224,12 +224,12 @@ void RGBController_RazerAddressable::DeviceUpdateLEDs()
|
|||
controller->SetLEDs(&colors_buf[0]);
|
||||
}
|
||||
|
||||
void RGBController_RazerAddressable::UpdateZoneLEDs(int zone)
|
||||
void RGBController_RazerAddressable::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_RazerAddressable::UpdateSingleLED(int led)
|
||||
void RGBController_RazerAddressable::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,12 +172,12 @@ void RGBController_RazerKraken::DeviceUpdateLEDs()
|
|||
controller->SetModeCustom(red, grn, blu);
|
||||
}
|
||||
|
||||
void RGBController_RazerKraken::UpdateZoneLEDs(int zone)
|
||||
void RGBController_RazerKraken::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
||||
void RGBController_RazerKraken::UpdateSingleLED(int led)
|
||||
void RGBController_RazerKraken::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
DeviceUpdateLEDs();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ union command_id_union
|
|||
} parts;
|
||||
};
|
||||
|
||||
PACK(typedef struct razer_report
|
||||
PACK(struct razer_report
|
||||
{
|
||||
unsigned char report_id;
|
||||
unsigned char status;
|
||||
|
|
@ -145,7 +145,7 @@ PACK(typedef struct razer_report
|
|||
/*---------------------------------------------------------*\
|
||||
| Razer ARGB Report Type (taken from OpenRazer) |
|
||||
\*---------------------------------------------------------*/
|
||||
PACK(typedef struct razer_argb_report
|
||||
PACK(struct razer_argb_report
|
||||
{
|
||||
unsigned char hid_id;
|
||||
unsigned char report_id;
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ PACK(typedef struct razer_kraken_request_report
|
|||
unsigned char arguments[32];
|
||||
});
|
||||
|
||||
PACK(typedef struct razer_kraken_response_report
|
||||
PACK(struct razer_kraken_response_report
|
||||
{
|
||||
unsigned char report_id;
|
||||
unsigned char arguments[36];
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ void RGBController_SteelSeriesOldApex::DeviceUpdateLEDs()
|
|||
|
||||
}
|
||||
|
||||
void RGBController_SteelSeriesOldApex::UpdateZoneLEDs(int zone)
|
||||
void RGBController_SteelSeriesOldApex::UpdateZoneLEDs(int /*zone*/)
|
||||
{
|
||||
// updating for one zone is pointless,
|
||||
// all zones have to be blasted anyway
|
||||
|
|
@ -218,7 +218,7 @@ void RGBController_SteelSeriesOldApex::UpdateZoneLEDs(int zone)
|
|||
}
|
||||
|
||||
|
||||
void RGBController_SteelSeriesOldApex::UpdateSingleLED(int led)
|
||||
void RGBController_SteelSeriesOldApex::UpdateSingleLED(int /*led*/)
|
||||
{
|
||||
// Each zone is one LED, however
|
||||
// updating for one zone is pointless,
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ void SteelSeriesApexMController::EnableLEDControl()
|
|||
hid_send_feature_report(dev, buf, 513);
|
||||
}
|
||||
|
||||
void SteelSeriesApexMController::SetMode(unsigned char mode, std::vector<RGBColor> colors)
|
||||
void SteelSeriesApexMController::SetMode(unsigned char /*mode*/, std::vector<RGBColor> /*colors*/)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -168,6 +168,8 @@ bool WootingKeyboardController::wooting_usb_send_feature(uint8_t commandId, uint
|
|||
| Send packet |
|
||||
\*---------------------------------------------------------*/
|
||||
hid_send_feature_report(dev, report_buffer, WOOTING_COMMAND_SIZE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WootingKeyboardController::wooting_usb_send_buffer(RGB_PARTS part_number, uint8_t rgb_buffer[])
|
||||
|
|
@ -225,4 +227,6 @@ bool WootingKeyboardController::wooting_usb_send_buffer(RGB_PARTS part_number, u
|
|||
| Send packet |
|
||||
\*---------------------------------------------------------*/
|
||||
hid_write(dev, report_buffer, WOOTING_REPORT_SIZE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,6 @@ std::vector<RGBController*> ProfileManager::LoadProfileToList
|
|||
std::vector<RGBController*> temp_controllers;
|
||||
unsigned int controller_size;
|
||||
unsigned int controller_offset = 0;
|
||||
bool ret_val = false;
|
||||
|
||||
std::string filename = configuration_directory + profile_name;
|
||||
|
||||
|
|
@ -193,8 +192,6 @@ std::vector<RGBController*> ProfileManager::LoadProfileToList
|
|||
|
||||
controller_offset += controller_size;
|
||||
controller_file.seekg(controller_offset);
|
||||
|
||||
ret_val = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ typedef unsigned int RGBColor;
|
|||
#define RGBGetGValue(rgb) ((rgb >> 8) & 0x000000FF)
|
||||
#define RGBGetBValue(rgb) ((rgb >> 16) & 0x000000FF)
|
||||
|
||||
#define ToRGBColor(r, g, b) ((b << 16) | (g << 8) | (r))
|
||||
#define ToRGBColor(r, g, b) ((RGBColor)((b << 16) | (g << 8) | (r)))
|
||||
|
||||
/*------------------------------------------------------------------*\
|
||||
| Mode Flags |
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ void i2c_smbus_linux_detect()
|
|||
char buff[100];
|
||||
unsigned short pci_device, pci_vendor, pci_subsystem_device, pci_subsystem_vendor;
|
||||
unsigned short port_id;
|
||||
bool info;
|
||||
|
||||
// Start looking for I2C adapters in /sys/bus/i2c/devices/
|
||||
strcpy(driver_path, "/sys/bus/i2c/devices/");
|
||||
|
|
|
|||
|
|
@ -693,7 +693,7 @@ void Ui::OpenRGBDevicePage::UpdateModeUi()
|
|||
ui->ResizeButton->setEnabled(true);
|
||||
}
|
||||
|
||||
for (std::size_t i = 0; i < device->modes[selected_mode].colors.size(); i++)
|
||||
for(unsigned int i = 0; i < device->modes[selected_mode].colors.size(); i++)
|
||||
{
|
||||
char id_buf[32];
|
||||
snprintf(id_buf, 16, "Mode Color %u", i);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue