fixed: __attribute__(unused) makes visual studio no happy
authorspiff <spiff@xbmc.org>
Sat, 15 Oct 2011 06:39:27 +0000 (08:39 +0200)
committerspiff <spiff@xbmc.org>
Sat, 15 Oct 2011 06:41:02 +0000 (08:41 +0200)
xbmc/cores/dvdplayer/DVDDemuxers/DVDDemuxVobsub.cpp
xbmc/input/SDLJoystick.cpp
xbmc/system.h
xbmc/utils/PerformanceSample.cpp

index bd6f5b6..2b93b28 100644 (file)
@@ -75,7 +75,7 @@ bool CDVDDemuxVobsub::Open(const string& filename, const string& subfilename)
   hints.codec = CODEC_ID_DVD_SUBTITLE;
 
   char line[2048];
-  bool __attribute__(unused) res;
+  DECLARE_UNUSED(bool,res)
 
   SState state;
   state.delay = 0;
index fa9652f..4caad37 100644 (file)
@@ -238,8 +238,8 @@ void CJoystick::Update(SDL_Event& joyEvent)
   int buttonId = -1;
   int axisId = -1;
   int joyId = -1;
-  bool __attribute__(unused) ignore = false; // not used for now
-  bool __attribute__(unused) axis = false;
+  DECLARE_UNUSED(bool,ignore = false)
+  DECLARE_UNUSED(bool,axis = false);
 
   switch(joyEvent.type)
   {
index 0262fde..a844bd8 100644 (file)
@@ -23,6 +23,7 @@
 
 #if defined(HAVE_CONFIG_H) && !defined(TARGET_WINDOWS)
 #include "config.h"
+#define DECLARE_UNUSED(a,b) a __attribute__(unused) b;
 #endif
 
 /*****************
 #define HAS_ZEROCONF
 #define HAS_AIRPLAY
 #define HAVE_LIBCEC
+
+#define DECLARE_UNUSED(a,b) a b;
 #endif
 
 /*****************
index 9238fc4..ade6326 100644 (file)
@@ -96,7 +96,7 @@ double CPerformanceSample::GetEstimatedError()
 
   for (int i=0; i<100000;i++)
   {
-    int64_t __attribute__(unused) tmDummy;
+    DECLARE_UNUSED(int64_t,tmDummy);
     tmDummy = CurrentHostCounter();
   }