mobizt / Firebase-ESP-Client

[DEPRECATED]🔥Firebase Arduino Client Library for ESP8266, ESP32 and RP2040 Pico. The complete, fast, secured and reliable Firebase Arduino client library that supports RTDB, Cloud Firestore, Firebase and Google Cloud Storage, Cloud Messaging and Cloud Functions for Firebase.
MIT License
471 stars 100 forks source link

Getting compile error with latest Firebase-ESP-client, older version was okat #559

Closed joopheuvel closed 1 year ago

joopheuvel commented 1 year ago

Just implemented latest Firebase-ESP-client library on Arduino IDE 221 with an Olimex-ESP32-EVB board. 4.3.20 compiled okay, latest one 4.4.1 gives an error:

c:\Users...OneDrive\Arduino\libraries\Firebase_Arduino_Client_Library_for_ESP8266_and_ESP32\src/client/WiFiClientImpl.h: In member function 'int WiFiClientImpl::tcpPeek()': c:\Users...OneDrive\Arduino\libraries\Firebase_Arduino_Client_Library_for_ESP8266_and_ESP32\src/client/WiFiClientImpl.h:414:47: error: suggest parentheses around '&&' within '||' [-Werror=parentheses] if (!_rxBuff || _fillPos == _fillSize && !fillRxBuffer()) ^ cc1plus.exe: some warnings being treated as errors

Can this be fixed? I gues I can try to find the relevant .h file and edit, but others may also have this issue, so would be good to change repository. Thanks. Joop van den Heuvel

mobizt commented 1 year ago

It's just compiler warning and peek() or tcpPeek() are not used.

mobizt commented 1 year ago

Compiler warning cannot turn into error.

joopheuvel commented 1 year ago

Thanks. Indeed, in my case the compilation stops as this one is treated as error not to be ignored, so cannot generate code. In meantime I put brackets around in the .h file. Thanks. Joop

mobizt commented 1 year ago

This is GCC compiler issue that treats the warning of unused code (never executed) as error.

In Arduino IDE Preferences, Compiler warnings should set to default.

I will fix this in the next update.

mobizt commented 1 year ago

Now the library was updated with issue fixed.