![]() ![]() Lastly, two projects had to be handled differently in MSVC because the warning appears in the windows libraries. So to handle those in MSVC too, it was enough to add `remove_cc_flag(/w34100)` to these macros. In some projects, such as those in extern, this warning is suppressed via the cmake macros `remove_strict_flags()` and `remove_extra_strict_flags()`. So, after lowering the warning level, adding this `pragma` to the existing `UNUSED` definitions suppressed most of the warnings. (Note that some C++ files used only for windows have been edited to silence the warning).Īlthough `_pragma(warning(suppress:4100))` is not the same as `_attribute_((_unused_))` in gcc (which only affects the attribute instead of the line), it still seems to be better to use it than to hide the warning entirely. In these cases the corresponding MSVC pragma has been added. Other cases the warning was specially suppressed for "GNUC" and "Clang" but missing for "MSVC". So to handle those in MSVC too, it was enough to add remove_cc_flag(/w34100) to these macros. In some projects, such as those in extern, this warning is suppressed via the cmake macros remove_strict_flags() and remove_extra_strict_flags(). So, after lowering the warning level, adding this pragma to the existing UNUSED definitions suppressed most of the warnings. With the C4100 warning, we better align with OSX/Linux warnings.Īlthough _pragma(warning(suppress:4100)) is not the same as _attribute_((_unused_)) in gcc (which only affects the attribute instead of the line), it still seems to be better to use it than to hide the warning entirely. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |