mirror of https://github.com/swig/swig
Turn on -Wunused-variable testing in GHA
Use -Wno-unused-variable warnings for scilab and go which need further work. Remove no longer needed -Wunused-function warning suppression in javascript.
This commit is contained in:
parent
22a8088a98
commit
1f8684eb54
|
@ -71,6 +71,7 @@ FAILING_CPP_TESTS := \
|
|||
nested_class \
|
||||
private_assign \
|
||||
special_variable_macros \
|
||||
string_constants \
|
||||
template_basic \
|
||||
template_default \
|
||||
template_enum \
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
def get_cflags(language, std, compiler):
|
||||
if std == None or len(std) == 0:
|
||||
std = "gnu89"
|
||||
c_common = "-fdiagnostics-show-option -std=" + std + " -Wno-long-long -Wreturn-type -Wmissing-field-initializers"
|
||||
c_common = "-fdiagnostics-show-option -std=" + std + " -Wno-long-long -Wreturn-type -Wmissing-field-initializers -Wunused-variable"
|
||||
if std == "gnu89" or std == "gnu90":
|
||||
# gnu89 standard allows declaration after headers
|
||||
# use c99 or gnu99 if feature is necessary for using target language
|
||||
|
@ -12,7 +12,7 @@ def get_cflags(language, std, compiler):
|
|||
"c":"-Werror " + c_common,
|
||||
"csharp":"-Werror " + c_common,
|
||||
"d":"-Werror " + c_common,
|
||||
"go":"-Werror " + c_common,
|
||||
"go":"-Werror " + c_common + " -Wno-unused-variable",
|
||||
"guile":"-Werror " + c_common,
|
||||
"java":"-Werror " + c_common,
|
||||
"javascript":"-Werror " + c_common,
|
||||
|
@ -24,7 +24,7 @@ def get_cflags(language, std, compiler):
|
|||
"python":"-Werror " + c_common,
|
||||
"r":"-Werror " + c_common,
|
||||
"ruby":"-Werror " + c_common,
|
||||
"scilab":"-Werror " + c_common,
|
||||
"scilab":"-Werror " + c_common + " -Wno-unused-variable",
|
||||
"tcl":"-Werror " + c_common,
|
||||
}
|
||||
if compiler == "clang":
|
||||
|
@ -38,15 +38,15 @@ def get_cflags(language, std, compiler):
|
|||
def get_cxxflags(language, std, compiler):
|
||||
if std == None or len(std) == 0:
|
||||
std = "c++98"
|
||||
cxx_common = "-fdiagnostics-show-option -std=" + std + " -Wno-long-long -Wreturn-type -Wmissing-field-initializers"
|
||||
cxx_common = "-fdiagnostics-show-option -std=" + std + " -Wno-long-long -Wreturn-type -Wmissing-field-initializers -Wunused-variable"
|
||||
cxxflags = {
|
||||
"c":"-Werror " + cxx_common,
|
||||
"csharp":"-Werror " + cxx_common,
|
||||
"d":"-Werror " + cxx_common,
|
||||
"go":"-Werror " + cxx_common,
|
||||
"go":"-Werror " + cxx_common + " -Wno-unused-variable",
|
||||
"guile":"-Werror " + cxx_common,
|
||||
"java":"-Werror " + cxx_common,
|
||||
"javascript":"-Werror " + cxx_common + " -Wno-error=unused-function", # Until overload_rename is fixed for node
|
||||
"javascript":"-Werror " + cxx_common,
|
||||
"lua":"-Werror " + cxx_common,
|
||||
"ocaml":"-Werror " + cxx_common,
|
||||
"octave":"-Werror " + cxx_common,
|
||||
|
@ -55,7 +55,7 @@ def get_cxxflags(language, std, compiler):
|
|||
"python":"-Werror " + cxx_common,
|
||||
"r":"-Werror " + cxx_common,
|
||||
"ruby":"-Werror " + cxx_common + " -Wno-deprecated-declarations", # For Ruby on MacOS Xcode 9.4 misconfiguration defining 'isfinite' to deprecated 'finite'
|
||||
"scilab":"-Werror " + cxx_common,
|
||||
"scilab":"-Werror " + cxx_common + " -Wno-unused-variable",
|
||||
"tcl":"-Werror " + cxx_common,
|
||||
}
|
||||
if compiler == "clang":
|
||||
|
|
Loading…
Reference in New Issue