]> git.sesse.net Git - vlc/commitdiff
Put (void)val; here and there to tell gcc we used the variable.
authorSam Hocevar <sam@zoy.org>
Thu, 20 Mar 2008 16:59:11 +0000 (16:59 +0000)
committerSam Hocevar <sam@zoy.org>
Thu, 20 Mar 2008 16:59:11 +0000 (16:59 +0000)
The spin_lock wrappers do not use the return value of the functions they
wrap, resulting in dozens of compiler warnings because they are inline
functions. There is no elegant solution to this, I hope using (void)val;
is the least shocking alternative.

include/vlc_threads_funcs.h

index 7add0dcc66cd69b45675e45ee751c35fafc76607..bf0566afdc0ef0d0e46d2cff688423c34c92e629 100644 (file)
@@ -581,6 +581,7 @@ static inline void vlc_spin_lock (vlc_spinlock_t *spin)
 {
     int val = pthread_spin_lock (&spin->spin);
     assert (val == 0);
+    (void)val;
 }
 
 /**
@@ -590,6 +591,7 @@ static inline void vlc_spin_unlock (vlc_spinlock_t *spin)
 {
     int val = pthread_spin_unlock (&spin->spin);
     assert (val == 0);
+    (void)val;
 }
 
 /**
@@ -599,6 +601,7 @@ static inline void vlc_spin_destroy (vlc_spinlock_t *spin)
 {
     int val = pthread_spin_destroy (&spin->spin);
     assert (val == 0);
+    (void)val;
 }
 
 #elif defined( WIN32 )