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;
|
||||
|
||||
%inline %{
|
||||
|
||||
static auto Bad1 = &t;
|
||||
static constexpr auto Bad2 = &f;
|
||||
static auto Bad3 = &zero;
|
||||
static constexpr auto Bad4 = &one;
|
||||
|
||||
%}
|
||||
%{
|
||||
// Wunused-variable warning suppression
|
||||
bool warning_suppression() {
|
||||
return Bad1 || Bad3;
|
||||
}
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
|
|
|
@ -128,6 +128,7 @@ void DirectorTest_director_testmethodSwigExplicitDirectorTest(int i) {}
|
|||
%typemap(directorargout) int i {
|
||||
$symname(99);
|
||||
int isvoid_special_variable = $isvoid;
|
||||
(void)isvoid_special_variable;
|
||||
}
|
||||
%feature("director") DirectorTest;
|
||||
%inline %{
|
||||
|
|
Loading…
Reference in New Issue