Commit 1632c6dd authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

objects: fix NDEBUG-only warning

parent 154ea505
......@@ -463,9 +463,12 @@ vlc_object_t *vlc_object_find_name( vlc_object_t *p_this, const char *psz_name )
void * vlc_object_hold( vlc_object_t *p_this )
{
vlc_object_internals_t *internals = vlc_internals( p_this );
#ifndef NDEBUG
unsigned refs = atomic_fetch_add (&internals->refs, 1);
assert (refs > 0); /* Avoid obvious freed object uses */ (void) refs;
assert (refs > 0); /* Avoid obvious freed object uses */
#else
atomic_fetch_add (&internals->refs, 1);
#endif
return p_this;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment