Skip to content

Commit

Permalink
Fix various USB warnings
Browse files Browse the repository at this point in the history
Fix the following warnings:
-[Warning] USBTester.cpp@45,0:  #1299-D: members and base-classes will
    be initialized in declaration order, not in member initialisation
    list order
-[Warning] USBTester.h@41,0:  #1300-D: ~USBTester inherits implicit
    virtual
-[Warning] USBAudio.cpp@345,0:  #1035-D: single-precision operand
    implicitly converted to double-precision
-[Warning] USBHID.cpp@29,0:  #1300-D: ~AsyncSend inherits implicit
    virtual
-[Warning] USBHID.cpp@61,0:  #1300-D: ~AsyncRead inherits implicit
    virtual
-[Warning] USBHID.cpp@93,0:  #1300-D: ~AsyncWait inherits implicit
    virtual
-[Warning] EndpointResolver.cpp@125,26: '<<' in boolean context, did
    you mean '<' ? [-Wint-in-bool-context]
  • Loading branch information
c1728p9 committed Oct 3, 2018
1 parent 876a6a9 commit 1231a63
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
5 changes: 3 additions & 2 deletions TESTS/usb_device/basic/USBTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@


USBTester::USBTester(USBPhy *phy, uint16_t vendor_id, uint16_t product_id, uint16_t product_release):
USBDevice(phy, vendor_id, product_id, product_release), reset_count(0), suspend_count(0),
resume_count(0), interface_0_alt_set(NONE), interface_1_alt_set(NONE), configuration_set(NONE)
USBDevice(phy, vendor_id, product_id, product_release), interface_0_alt_set(NONE),
interface_1_alt_set(NONE), configuration_set(NONE), reset_count(0),
suspend_count(0), resume_count(0)
{

EndpointResolver resolver(endpoint_table());
Expand Down
2 changes: 1 addition & 1 deletion TESTS/usb_device/basic/USBTester.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class USBTester: public USBDevice {
*/
USBTester(USBPhy *phy, uint16_t vendor_id, uint16_t product_id, uint16_t product_release);

~USBTester();
virtual ~USBTester();

/*
*
Expand Down
2 changes: 1 addition & 1 deletion usb/device/USBAudio/USBAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ float USBAudio::get_volume()
{
lock();

float ret = _mute ? 0.0 : _volume;
float ret = _mute ? 0.0f : _volume;

unlock();
return ret;
Expand Down
2 changes: 1 addition & 1 deletion usb/device/USBDevice/EndpointResolver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ int EndpointResolver::next_index(usb_ep_type_t type, bool in_not_out)
continue;
}

if (shared && (1 << other)) {
if (shared && (_used & (1 << other))) {
// This endpoint can only be one direction at a time and is in
// use by the other direction
continue;
Expand Down
6 changes: 3 additions & 3 deletions usb/device/USBHID/USBHID.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class USBHID::AsyncSend: public AsyncOp {

}

~AsyncSend()
virtual ~AsyncSend()
{

}
Expand Down Expand Up @@ -58,7 +58,7 @@ class USBHID::AsyncRead: public AsyncOp {

}

~AsyncRead()
virtual ~AsyncRead()
{

}
Expand Down Expand Up @@ -90,7 +90,7 @@ class USBHID::AsyncWait: public AsyncOp {

}

~AsyncWait()
virtual ~AsyncWait()
{

}
Expand Down

0 comments on commit 1231a63

Please sign in to comment.