mirror of https://github.com/swig/swig
Fix -Wunused-variable warnings in testcases
This commit is contained in:
parent
6e83542054
commit
56b768f258
|
@ -41,12 +41,16 @@ static constexpr auto NOEXCEPT_FUNC = noexcept(func);
|
||||||
%warnfilter(SWIGWARN_CPP11_AUTO) Bad4;
|
%warnfilter(SWIGWARN_CPP11_AUTO) Bad4;
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
||||||
static auto Bad1 = &t;
|
static auto Bad1 = &t;
|
||||||
static constexpr auto Bad2 = &f;
|
static constexpr auto Bad2 = &f;
|
||||||
static auto Bad3 = &zero;
|
static auto Bad3 = &zero;
|
||||||
static constexpr auto Bad4 = &one;
|
static constexpr auto Bad4 = &one;
|
||||||
|
%}
|
||||||
|
%{
|
||||||
|
// Wunused-variable warning suppression
|
||||||
|
bool warning_suppression() {
|
||||||
|
return Bad1 || Bad3;
|
||||||
|
}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
|
@ -128,6 +128,7 @@ void DirectorTest_director_testmethodSwigExplicitDirectorTest(int i) {}
|
||||||
%typemap(directorargout) int i {
|
%typemap(directorargout) int i {
|
||||||
$symname(99);
|
$symname(99);
|
||||||
int isvoid_special_variable = $isvoid;
|
int isvoid_special_variable = $isvoid;
|
||||||
|
(void)isvoid_special_variable;
|
||||||
}
|
}
|
||||||
%feature("director") DirectorTest;
|
%feature("director") DirectorTest;
|
||||||
%inline %{
|
%inline %{
|
||||||
|
|
Loading…
Reference in New Issue