Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e9f54d

Browse files
committed
Define descriptor return var in pluggable block
Avoids unused variable warning if USB is enabled but pluggable USB is not
1 parent 5755dde commit 9e9f54d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cores/arduino/USBCore.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,14 +496,13 @@ bool SendConfiguration(int maxlen)
496496
static
497497
bool SendDescriptor(USBSetup& setup)
498498
{
499-
int ret;
500499
u8 t = setup.wValueH;
501500
if (USB_CONFIGURATION_DESCRIPTOR_TYPE == t)
502501
return SendConfiguration(setup.wLength);
503502

504503
InitControl(setup.wLength);
505504
#ifdef PLUGGABLE_USB_ENABLED
506-
ret = PluggableUSB().getDescriptor(setup);
505+
int ret = PluggableUSB().getDescriptor(setup);
507506
if (ret != 0) {
508507
return (ret > 0 ? true : false);
509508
}

0 commit comments

Comments
 (0)