PlatformIO Community

Suppress warnings from library code?

I’m wondering if there’s a way to suppress warnings only from library source code. I know it’s possible to set build flags such as -w to ignore all warnings, but I want to see warnings from my own code while ignoring the spam I get from lib_deps.

Is there a way to do this without forking all my libraries and fixing their warnings?

2 Likes

I’d love to know if there is also, but I suspect the answer is fix the libraries. :frowning: The root issue being the Arduino IDE used to hide most of these warnings, so the library writers never saw them, so didn’t fix them (or make them! :laughing:) in the first place.

Oh, this looks like it might fit the bill…

2 Likes

Ah, if only library maintainers would respond to my pull requests. I’ve tried this before, with only a few polite folks bothering to respond, and even fewer kind souls taking the time to review and merge my changes.

In an ideal world, I agree this would be the best option.

1 Like

Any luck with this? .

There are global flags and per project/src. See https://docs.platformio.org/en/latest/projectconf/section_env_build.html