From 3d5b46d0556270a2d7fe6a5abf71cfa5cb5c205a Mon Sep 17 00:00:00 2001 From: Kristian Sloth Lauszus Date: Thu, 16 Apr 2015 00:07:47 +0200 Subject: [PATCH] Fixed "warning: no return statement in function returning non-void" --- cdcacm.h | 2 +- cdcftdi.h | 2 ++ hid.h | 8 ++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/cdcacm.h b/cdcacm.h index 8372f56b..2a38524d 100644 --- a/cdcacm.h +++ b/cdcacm.h @@ -204,7 +204,7 @@ public: uint8_t Poll(); bool available(void) { - + return false; }; virtual uint8_t GetAddress() { diff --git a/cdcftdi.h b/cdcftdi.h index 5a133241..b7312526 100644 --- a/cdcftdi.h +++ b/cdcftdi.h @@ -80,9 +80,11 @@ class FTDIAsyncOper { public: virtual uint8_t OnInit(FTDI *pftdi) { + return 0; }; virtual uint8_t OnRelease(FTDI *pftdi) { + return 0; }; }; diff --git a/hid.h b/hid.h index 14507183..72942ebc 100644 --- a/hid.h +++ b/hid.h @@ -156,7 +156,9 @@ protected: void PrintEndpointDescriptor(const USB_ENDPOINT_DESCRIPTOR* ep_ptr); void PrintHidDescriptor(const USB_HID_DESCRIPTOR *pDesc); - virtual HIDReportParser* GetReportParser(uint8_t id) {}; + virtual HIDReportParser* GetReportParser(uint8_t id) { + return NULL; + }; public: @@ -167,7 +169,9 @@ public: return pUsb; }; - virtual bool SetReportParser(uint8_t id, HIDReportParser *prs) {}; + virtual bool SetReportParser(uint8_t id, HIDReportParser *prs) { + return false; + }; uint8_t SetProtocol(uint8_t iface, uint8_t protocol); uint8_t GetProtocol(uint8_t iface, uint8_t* dataptr);