⚠️ We have a new website! Visit now for the most update to date documentation. This wiki is no longer being maintained.
Disables specific compiler warnings.
disablewarnings { "warnings" }
warnings is a list of warnings to disable.
warnings
For Visual Studio, the MSC warning number should be used to specify the warning. On other compilers, the warning should be identified by name.
Project configurations.
Premake 5.0 or later.
Xcode project generation does not yet support disablewarnings. As a workaround, you can use xcodebuildsettings like this:
disablewarnings
xcodebuildsettings { WARNING_CFLAGS = "-Wall -Wextra " .. "-Wno-missing-field-initializers " .. "-Wno-unknown-pragmas " .. "-Wno-unused-parameter " .. "-Wno-unused-local-typedef " .. "-Wno-missing-braces " .. "-Wno-microsoft-anon-tag " }
Disable the GCC warning about using old-style C casts (-Wno-old-style-cast command line argument):
-Wno-old-style-cast
filter "options:cc=gcc" disablewarnings "old-style-cast"
There was an error while loading. Please reload this page.