siara-cc / esp32_arduino_sqlite3_lib

Sqlite3 Arduino library for ESP32
Apache License 2.0
350 stars 66 forks source link

Compile Error on compiler warnings "All" #88

Open yagikjp opened 4 months ago

yagikjp commented 4 months ago

I compiled sketch by Arduino IDE 1 and 2, compile process is stoped by error. and I found when IDE preferences > "Compiler warnings" set to "All", it is occurred.

Error is "unused variable" e.g. esp32.cpp:164:9: error: unused variable 'ofst'

esp32.cpp and unishox1.c has several same error. If it is possible, please eliminate unused variable.

Thanks.

robertlipe commented 2 months ago

Odd since ofst is clearly used at https://github.com/siara-cc/esp32_arduino_sqlite3_lib/blob/d0b26f509643604421c85d415f997d7f42cd43a6/src/esp32.cpp#L179

But if you're the one turning on the "make warnings into errors" flag and then getting errors because you asked for them, it seems the responsibility should be upon you to provide a pull request to tidy this up after you've done so and tested it. That's just part of being a good open source citizen; not demanding that maintainers cater to your use of esoteric build flags.

In general -Werror is an unmaintainable goal. Different environments (GCC versions, default flags, target processors, etc.) will all have different things they consider warnings and warnings are warnings not errors for a reason - often, the compiler lacks the confidence to do anything with the data. Therefore, it's generally up to the person asking for a clean -Werror build on their environment to make it happen.

Disclaimer: While I've been in free software since the 80's, I'm not involved in this project; I was just reading open issues while studying the code for a potential project.