mirror of https://github.com/ARMmbed/mbed-os.git
Fix various USB warnings
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]pull/9768/head
parent
6d88bd118f
commit
793044eb26
|
@ -41,8 +41,9 @@
|
||||||
|
|
||||||
|
|
||||||
USBTester::USBTester(USBPhy *phy, uint16_t vendor_id, uint16_t product_id, uint16_t product_release):
|
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),
|
USBDevice(phy, vendor_id, product_id, product_release), interface_0_alt_set(NONE),
|
||||||
resume_count(0), interface_0_alt_set(NONE), interface_1_alt_set(NONE), configuration_set(NONE)
|
interface_1_alt_set(NONE), configuration_set(NONE), reset_count(0),
|
||||||
|
suspend_count(0), resume_count(0)
|
||||||
{
|
{
|
||||||
|
|
||||||
EndpointResolver resolver(endpoint_table());
|
EndpointResolver resolver(endpoint_table());
|
||||||
|
|
|
@ -38,7 +38,7 @@ public:
|
||||||
*/
|
*/
|
||||||
USBTester(USBPhy *phy, uint16_t vendor_id, uint16_t product_id, uint16_t product_release);
|
USBTester(USBPhy *phy, uint16_t vendor_id, uint16_t product_id, uint16_t product_release);
|
||||||
|
|
||||||
~USBTester();
|
virtual ~USBTester();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
|
|
|
@ -342,7 +342,7 @@ float USBAudio::get_volume()
|
||||||
{
|
{
|
||||||
lock();
|
lock();
|
||||||
|
|
||||||
float ret = _mute ? 0.0 : _volume;
|
float ret = _mute ? 0.0f : _volume;
|
||||||
|
|
||||||
unlock();
|
unlock();
|
||||||
return ret;
|
return ret;
|
||||||
|
|
|
@ -122,7 +122,7 @@ int EndpointResolver::next_index(usb_ep_type_t type, bool in_not_out)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shared && (1 << other)) {
|
if (shared && (_used & (1 << other))) {
|
||||||
// This endpoint can only be one direction at a time and is in
|
// This endpoint can only be one direction at a time and is in
|
||||||
// use by the other direction
|
// use by the other direction
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -26,7 +26,7 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
~AsyncSend()
|
virtual ~AsyncSend()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
~AsyncRead()
|
virtual ~AsyncRead()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -90,7 +90,7 @@ public:
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
~AsyncWait()
|
virtual ~AsyncWait()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue