Skip to content

Compile Error on compiler warnings "All" #88

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

Open
yagikjp opened this issue Mar 4, 2024 · 1 comment
Open

Compile Error on compiler warnings "All" #88

yagikjp opened this issue Mar 4, 2024 · 1 comment

Comments

@yagikjp
Copy link

yagikjp commented Mar 4, 2024

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
Copy link

Odd since ofst is clearly used at

ofst = fseek(p->fp, iOfst, SEEK_SET); //lseek(p->fd, iOfst, SEEK_SET);

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.

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

No branches or pull requests

2 participants