Skip to content

fix compile errors([-Werror=parentheses]) #10

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
Feb 25, 2021

Conversation

MedadRufus
Copy link

This fatal error is thrown when compiling for the ESP32. It demands that a parentheses around comparison in operand of '&'. Fix by putting parentheses.

The error from the compiler looks like this:

C:\Users\Medad\Documents\Arduino\libraries\SparkFun_u-blox_GNSS_Arduino_Library\src\SparkFun_u-blox_GNSS_Arduino_Library.cpp:9600:79: error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses]

   if (packetUBXESFMEAS->moduleQueried.moduleQueried.bits.data & (1 << sensor) == 0)

This error is thrown when compiling for the ESP32. It demands that a parentheses around comparison in operand of '&'. Fix by putting parentheses.
@PaulZC PaulZC merged commit 1f5f480 into sparkfun:master Feb 25, 2021
PaulZC pushed a commit that referenced this pull request Jun 27, 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

Successfully merging this pull request may close these issues.

2 participants