Skip to content

Misleadingly 'else' clause #103

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

Closed
fubian opened this issue Mar 30, 2020 · 0 comments
Closed

Misleadingly 'else' clause #103

fubian opened this issue Mar 30, 2020 · 0 comments

Comments

@fubian
Copy link

fubian commented Mar 30, 2020

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);              
         ^~~~~~~~~   
fubian pushed a commit to fubian/ArduinoCore-sam that referenced this issue Mar 30, 2020
fubian pushed a commit to fubian/ArduinoCore-sam that referenced this issue Apr 1, 2020
slippyr4 pushed a commit to slippyr4/ArduinoCore-sam that referenced this issue Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant