Unable to silence warnings from the framework/pico-sdk #2104
Replies: 6 comments 11 replies
-
Workaround using more extra scriptingI updated my extra script as workaround, adding all the file parsing, then prefixes unrolling and changing the framework includes to use I guess it's not perfect, as now the whole process has to create temporary files because of how long the shell command is with all those arguments. Here is Workaround using other include flagMeanwhile I learnt there is Do you think could it be updated in the repo? I don't want to create pull request, since I am not sure if it changes/breaks anything due to the include order changes; would require some intuition to judge it and testing to make sure, I imagine. By the wayUsing those workarounds, nor any of my attempts so far, I haven't managed to get rid of all warnings. While I see them no more while modifying my files, there are still some after cleaning the environment - due to recompilation of some framework provided |
Beta Was this translation helpful? Give feedback.
-
Update: I just found out that using second workaround doesn't work for me: VS Code arduino-pico/tools/platformio-build.py Lines 46 to 52 in 2a256f9 For now I will be using my extra script, but I hope you consider if |
Beta Was this translation helpful? Give feedback.
-
Those headers are used in the core and built in the CI without warnings. Are you using a non standard compiler or set up? |
Beta Was this translation helpful? Give feedback.
-
I don't think so. Versions are in the logs:
The example warning I included in the first post seems to come from BTW, sorry for late response. |
Beta Was this translation helpful? Give feedback.
-
Moved to a discussion because now that I'm back home I can see your P.IO config is neither using the default compiler we use (gcc 12.3 from the pico-quick-toolchain repo) nor the C++ standard ( Since it's not really core core related, I think your best bet is to go the the P.IO forums and see if they can figure out some magic to apply different configs to different files. |
Beta Was this translation helpful? Give feedback.
-
I commented out any custom C++ level flag from my PlatformIO (both Example part of the log:
|
Beta Was this translation helpful? Give feedback.
-
While compiling my project there are a lot of warnings coming vendor code I can't directly change, so I wan to silence it to focus on my own project files.
My setup
I use PlatformIO include Visual Studio Code on Windows.
I use combination of
build_unflags
/build_src_flags
to apply warnings only to my sourced compilation units, and then extra script to change paths inCPPPATH
to use-isystem
to ignore the warnings.My
platformio.ini
:I use extra script
scripts/convert_sysincludes.py
to convert some includes to be included as-isystem
:Sadly, it's not enough.
Example warnings when compiling:
Using
pio run --verbose
I can inspect final compiler arguments:And I can see
-iprefixC:\Users\PsychoX\.platformio\packages\framework-arduinopico @C:\Users\PsychoX\.platformio\packages\framework-arduinopico\lib\platform_inc.txt
which the extra script I use can do nothing about (or rather would be quite hard) to make it as system (so warnings ignored) include.While researching issue I found #615:
arduino-pico/tools/platformio-build.py
Lines 185 to 192 in 2a256f9
-isystem
anyways?Beta Was this translation helpful? Give feedback.
All reactions