From f37cdf8ffa662ef8f8f4b4a8d23c7973a644f30b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Sarrailh?= Date: Fri, 15 Feb 2019 21:35:06 +0100 Subject: [PATCH] Fix for ESP32 with Compiler Warning:All I got this error with ESP32 error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses] When compiler warning is set on All, the code will not compile --- Adafruit_TSL2561_U.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Adafruit_TSL2561_U.cpp b/Adafruit_TSL2561_U.cpp index 69663fa..f77eaf7 100644 --- a/Adafruit_TSL2561_U.cpp +++ b/Adafruit_TSL2561_U.cpp @@ -107,7 +107,7 @@ boolean Adafruit_TSL2561_Unified::init() { /* Make sure we're actually connected */ uint8_t x = read8(TSL2561_REGISTER_ID); - if (x & 0xF0 != 0x10) { // ID code for TSL2561 + if ((x & 0xF0) != 0x10) { // ID code for TSL2561 return false; } _tsl2561Initialised = true;