Skip to content

Fix various USB warnings #7233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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