arduino / ArduinoCore-sam

80 stars 107 forks source link

Misleadingly 'else' clause #103

Closed fubian closed 3 years ago

fubian commented 4 years ago

In USBCore.cpp the 'else' clause is missleading due to missing braces: https://github.com/arduino/ArduinoCore-sam/blob/master/cores/arduino/USB/USBCore.cpp#L689-L690

/home/***/.platformio/packages/framework-arduinosam/cores/sam/USB/USBCore.cpp: In function 'void USB_ISR()':             
/home/***/.platformio/packages/framework-arduinosam/cores/sam/USB/USBCore.cpp:688:21: warning: this 'else' clause does not guard... [-Wmisleading
-indentation]                                                    
                     else                      
                     ^~~~                         
/home/***/.platformio/packages/framework-arduinosam/cores/sam/USB/USBCore.cpp:690:9: note: ...this statement, but the latter is misleadingly inde
nted as if it were guarded by the 'else'                          
         UDD_Send8(EP0, 0);              
         ^~~~~~~~~