Skip to content
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

Fixed misleading indent warning in bcm2835.c #444

Merged
merged 1 commit into from
Jul 3, 2018

Conversation

rmullin7286
Copy link
Contributor

Previously when compiling with the bcm2835/RPi driver gcc would emit the following warnings:

utility/RPi/bcm2835.c: In function ‘bcm2835_gpio_pad’:
utility/RPi/bcm2835.c:420:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (bcm2835_pads == MAP_FAILED)
^~
utility/RPi/bcm2835.c:423:5: note: ...this statement, but the latter is misleadingly indented as if it is 
guarded by the ‘if’
volatile uint32_t* paddr = bcm2835_pads + BCM2835_PADS_GPIO_0_27/4 + group;
^~~~~~~~
utility/RPi/bcm2835.c: In function ‘bcm2835_gpio_set_pad’:
utility/RPi/bcm2835.c:433:3: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
if (bcm2835_pads == MAP_FAILED)
^~
utility/RPi/bcm2835.c:436:5: note: ...this statement, but the latter is misleadingly indented as if it is 
guarded by the ‘if’
volatile uint32_t* paddr = bcm2835_pads + BCM2835_PADS_GPIO_0_27/4 + group;

This was caused by a simple misplaced indent in the two functions mentioned. These indents were removed and the compiler no longer emits these warnings.

@Avamander Avamander merged commit a871827 into nRF24:master Jul 3, 2018
@Avamander
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants