From db54a8d5d11636c2dca4e09766786e144e200b9a Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 28 May 2016 09:59:16 +0100 Subject: [PATCH] Fix unused warnings in perl wrappers --- Examples/test-suite/preproc_defined.i | 1 + Examples/test-suite/typemap_subst.i | 2 ++ Lib/perl5/perlrun.swg | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Examples/test-suite/preproc_defined.i b/Examples/test-suite/preproc_defined.i index 0a91bd98a..e1958515d 100644 --- a/Examples/test-suite/preproc_defined.i +++ b/Examples/test-suite/preproc_defined.i @@ -102,6 +102,7 @@ ANOTHER_MACRO(int) void another_macro_checking(void) { struct Defined d; d.defined = 10; + (void)d; thing(10); stuff(10); bumpf(10); diff --git a/Examples/test-suite/typemap_subst.i b/Examples/test-suite/typemap_subst.i index 91ac62020..946384840 100644 --- a/Examples/test-suite/typemap_subst.i +++ b/Examples/test-suite/typemap_subst.i @@ -27,12 +27,14 @@ (void)c; (void)d; (void)e; + (void)f; } { /* Test locals */ basetemp.member = 0; startemp = &basetemp; temp = &startemp; amptemp = &temp; + (void)amptemp; } { /* Test descriptors */ void *desc = $descriptor; diff --git a/Lib/perl5/perlrun.swg b/Lib/perl5/perlrun.swg index 876fae268..d1865de0a 100644 --- a/Lib/perl5/perlrun.swg +++ b/Lib/perl5/perlrun.swg @@ -144,9 +144,9 @@ typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *); # ifdef PERL_OBJECT # define SWIG_croak_null() SWIG_Perl_croak_null(pPerl) -static void SWIG_Perl_croak_null(CPerlObj *pPerl) +static void SWIGUNUSED SWIG_Perl_croak_null(CPerlObj *pPerl) # else -static void SWIG_croak_null() +static void SWIGUNUSED SWIG_croak_null() # endif { SV *err = get_sv("@", GV_ADD);