[FL-2520] FW build with -Wextra (#1185)
* Fixing compiler warnings with -Wextra * More warnings suppression, WIP * Even more warning fixes * Added new lines at end of text files. * Padding fix * Additional fixes to warnings on different build configurations; added -Wextra to default build pipeline * Fixes for Secplus v1 * -additional warnings * +-Wredundant-decls fixes * FuriHal: print stack overflow task name in console * FuriHal: add missing include Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -375,6 +375,7 @@ static void* hid_set_string_descr(char* str) {
|
||||
}
|
||||
|
||||
static void hid_init(usbd_device* dev, FuriHalUsbInterface* intf, void* ctx) {
|
||||
UNUSED(intf);
|
||||
FuriHalUsbHidConfig* cfg = (FuriHalUsbHidConfig*)ctx;
|
||||
if(hid_semaphore == NULL) hid_semaphore = osSemaphoreNew(1, 1, NULL);
|
||||
usb_dev = dev;
|
||||
@@ -419,17 +420,23 @@ static void hid_deinit(usbd_device* dev) {
|
||||
}
|
||||
|
||||
static void hid_on_wakeup(usbd_device* dev) {
|
||||
if(hid_connected == false) {
|
||||
UNUSED(dev);
|
||||
if(!hid_connected) {
|
||||
hid_connected = true;
|
||||
if(callback != NULL) callback(true, cb_ctx);
|
||||
if(callback != NULL) {
|
||||
callback(true, cb_ctx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void hid_on_suspend(usbd_device* dev) {
|
||||
if(hid_connected == true) {
|
||||
UNUSED(dev);
|
||||
if(hid_connected) {
|
||||
hid_connected = false;
|
||||
osSemaphoreRelease(hid_semaphore);
|
||||
if(callback != NULL) callback(false, cb_ctx);
|
||||
if(callback != NULL) {
|
||||
callback(false, cb_ctx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -450,6 +457,7 @@ static bool hid_send_report(uint8_t report_id) {
|
||||
}
|
||||
|
||||
static void hid_txrx_ep_callback(usbd_device* dev, uint8_t event, uint8_t ep) {
|
||||
UNUSED(dev);
|
||||
if(event == usbd_evt_eptx) {
|
||||
osSemaphoreRelease(hid_semaphore);
|
||||
} else {
|
||||
@@ -484,6 +492,7 @@ static usbd_respond hid_ep_config(usbd_device* dev, uint8_t cfg) {
|
||||
|
||||
/* Control requests handler */
|
||||
static usbd_respond hid_control(usbd_device* dev, usbd_ctlreq* req, usbd_rqc_callback* callback) {
|
||||
UNUSED(callback);
|
||||
/* HID control requests */
|
||||
if(((USB_REQ_RECIPIENT | USB_REQ_TYPE) & req->bmRequestType) ==
|
||||
(USB_REQ_INTERFACE | USB_REQ_CLASS) &&
|
||||
|
Reference in New Issue
Block a user