From 98444da30781bd858873c4c3dbea48423d553bc6 Mon Sep 17 00:00:00 2001 From: MedadRufus Date: Thu, 25 Feb 2021 00:49:53 +0000 Subject: [PATCH] fix compile errors([-Werror=parentheses]) This error is thrown when compiling for the ESP32. It demands that a parentheses around comparison in operand of '&'. Fix by putting parentheses. --- src/SparkFun_u-blox_GNSS_Arduino_Library.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp index ddb9abc..aaa1f11 100644 --- a/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp +++ b/src/SparkFun_u-blox_GNSS_Arduino_Library.cpp @@ -9597,7 +9597,7 @@ boolean SFE_UBLOX_GNSS::getSensorFusionMeasurement(UBX_ESF_MEAS_sensorData_t *se if (packetUBXESFMEAS == NULL) //Bail if the RAM allocation failed return (false); - if (packetUBXESFMEAS->moduleQueried.moduleQueried.bits.data & (1 << sensor) == 0) + if (packetUBXESFMEAS->moduleQueried.moduleQueried.bits.data & ((1 << sensor) == 0)) getESFMEAS(maxWait); packetUBXESFMEAS->moduleQueried.moduleQueried.bits.data &= ~(1 << sensor); //Since we are about to give this to user, mark this data as stale packetUBXESFMEAS->moduleQueried.moduleQueried.bits.all = false; @@ -9617,7 +9617,7 @@ boolean SFE_UBLOX_GNSS::getRawSensorMeasurement(UBX_ESF_RAW_sensorData_t *sensor if (packetUBXESFRAW == NULL) //Bail if the RAM allocation failed return (false); - if (packetUBXESFRAW->moduleQueried.moduleQueried.bits.data & (1 << sensor) == 0) + if (packetUBXESFRAW->moduleQueried.moduleQueried.bits.data & ((1 << sensor) == 0)) getESFRAW(maxWait); packetUBXESFRAW->moduleQueried.moduleQueried.bits.data &= ~(1 << sensor); //Since we are about to give this to user, mark this data as stale packetUBXESFRAW->moduleQueried.moduleQueried.bits.all = false; @@ -9639,7 +9639,7 @@ boolean SFE_UBLOX_GNSS::getSensorFusionStatus(UBX_ESF_STATUS_sensorStatus_t *sen if (packetUBXESFSTATUS == NULL) //Bail if the RAM allocation failed return (false); - if (packetUBXESFSTATUS->moduleQueried.moduleQueried.bits.status & (1 << sensor) == 0) + if (packetUBXESFSTATUS->moduleQueried.moduleQueried.bits.status & ((1 << sensor) == 0)) getESFSTATUS(maxWait); packetUBXESFSTATUS->moduleQueried.moduleQueried.bits.status &= ~(1 << sensor); //Since we are about to give this to user, mark this data as stale packetUBXESFSTATUS->moduleQueried.moduleQueried.bits.all = false;