Fix -Wunused-variable warnings in testcases

This commit is contained in:
William S Fulton 2025-06-21 15:46:15 +01:00
parent 6e83542054
commit 56b768f258
2 changed files with 7 additions and 2 deletions

View File

@ -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 %{

View File

@ -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 %{