Browse Source

Put (void)val; here and there to tell gcc we used the variable.

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.
pull/2/head
Sam Hocevar 19 years ago
parent
commit
cfc98288ba
  1. 3
      include/vlc_threads_funcs.h

3
include/vlc_threads_funcs.h

@ -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 )

Loading…
Cancel
Save