mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Add CodeQL for GitHub code scanning (#1548)
* Create codeql.yml * Addressing codeql findings
This commit is contained in:
@@ -63,7 +63,9 @@ bool LedDeviceHyperionUsbasp::init(const QJsonObject &deviceConfig)
|
||||
else
|
||||
{
|
||||
Debug(_log, "USB context initialized");
|
||||
//libusb_set_debug(_libusbContext, 3);
|
||||
#if 0
|
||||
libusb_set_debug(_libusbContext, 3);
|
||||
#endif
|
||||
|
||||
// retrieve the list of USB devices
|
||||
libusb_device ** deviceList;
|
||||
|
@@ -331,8 +331,6 @@ const QString &LedDeviceLightpack::getSerialNumber() const
|
||||
int LedDeviceLightpack::writeBytes(uint8_t *data, int size)
|
||||
{
|
||||
int rc = 0;
|
||||
//Debug( _log, "[%s]", QSTRING_CSTR(uint8_t_to_hex_string(data, size, 32)) );
|
||||
|
||||
int error = libusb_control_transfer(_deviceHandle,
|
||||
static_cast<uint8_t>( LIBUSB_ENDPOINT_OUT | LIBUSB_REQUEST_TYPE_CLASS | LIBUSB_RECIPIENT_INTERFACE ),
|
||||
0x09,
|
||||
|
@@ -73,8 +73,8 @@ int ProviderHID::open()
|
||||
// Failed to open the device
|
||||
this->setInError( "Failed to open HID device. Maybe your PID/VID setting is wrong? Make sure to add a udev rule/use sudo." );
|
||||
|
||||
#if 0
|
||||
// http://www.signal11.us/oss/hidapi/
|
||||
/*
|
||||
std::cout << "Showing a list of all available HID devices:" << std::endl;
|
||||
auto devs = hid_enumerate(0x00, 0x00);
|
||||
auto cur_dev = devs;
|
||||
@@ -88,7 +88,8 @@ int ProviderHID::open()
|
||||
cur_dev = cur_dev->next;
|
||||
}
|
||||
hid_free_enumeration(devs);
|
||||
*/
|
||||
#endif
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user