From 43b0008892c7e3ed9e5dc874a16943e6e16cd764 Mon Sep 17 00:00:00 2001 From: Marcelo Matus Date: Tue, 22 Feb 2005 19:51:59 +0000 Subject: fix static/inline warning, add SWIGUNUSED attribute git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6979 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Lib/swigrun.swg | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'Lib/swigrun.swg') diff --git a/Lib/swigrun.swg b/Lib/swigrun.swg index 0e903a336..6fb33fa2a 100644 --- a/Lib/swigrun.swg +++ b/Lib/swigrun.swg @@ -29,6 +29,15 @@ #endif #endif +/* attritbute passed for some compilers to avoid unused method warnings */ +#ifndef SWIGUNUSED +#ifdef __GNUC__ +#define SWIGUNUSED __attribute__ ((unused)) +#else +#define SWIGUNUSED +#endif +#endif + /* You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for creating a static or dynamic library from the swig runtime code. @@ -37,13 +46,11 @@ But only do this if is strictly necessary, ie, if you have problems with your compiler or so. */ + #ifndef SWIGRUNTIME -#ifdef __GNUC__ -#define SWIGRUNTIME __attribute__ ((unused)) static -#else -#define SWIGRUNTIME static -#endif +#define SWIGRUNTIME static SWIGUNUSED #endif + #ifndef SWIGRUNTIMEINLINE #define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif -- cgit v1.2.3