We're working on a bigger embedded project, where we are using pre-compiled libraries. When compiling, lines where foreign code is used throw a huge amount of warnings. One occuring really often is
warning: ignoring packed attribute because of unpacked non-POD field '....'
This happens with gcc-arm-none-eabi-6-2017-q and Eclipse for embedded C/C++, version: 2020-09 (4.17.0).
I found multiple ways to get rid of warnings:
- Add Comment
// @suppress ("warning ....")
, which does not work in that case. - As stated here, one can disable a specific warning using the warning number and -Wno-xxxx.
- We could disable the whole group to which a warning belongs, see the first list here. I added
-Wpacked
to the makefile just to see what happens, it added 48'000 warnings. So this is probably not our candidate.
Does anybody know the warning number/category for that one? Or how do disable it in any other way?