Commit 80d88b05 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Mark unreachable code on GCC even if NDEBUG

This might suppress some warnings (and very slightly reduce code size)
when assertions are disabled. Not that I particularly like to create
VLC-specific macros.
parent c63f722d
...@@ -112,13 +112,17 @@ ...@@ -112,13 +112,17 @@
/* Branch prediction */ /* Branch prediction */
#ifdef __GNUC__ #ifdef __GNUC__
# define likely(p) __builtin_expect(!!(p), 1) # define likely(p) __builtin_expect(!!(p), 1)
# define unlikely(p) __builtin_expect(!!(p), 0) # define unlikely(p) __builtin_expect(!!(p), 0)
# define unreachable() __builtin_unreachable()
#else #else
# define likely(p) (!!(p)) # define likely(p) (!!(p))
# define unlikely(p) (!!(p)) # define unlikely(p) (!!(p))
# define unreachable() ((void)0)
#endif #endif
#define vlc_assert_unreachable() (assert(!"unreachable"), unreachable())
/* Linkage */ /* Linkage */
#ifdef __cplusplus #ifdef __cplusplus
# define VLC_EXTERN extern "C" # define VLC_EXTERN extern "C"
......
...@@ -373,7 +373,7 @@ int event_attach( libvlc_event_manager_t * p_event_manager, ...@@ -373,7 +373,7 @@ int event_attach( libvlc_event_manager_t * p_event_manager,
free(listener); free(listener);
fprintf( stderr, "This object event manager doesn't know about '%s' events", fprintf( stderr, "This object event manager doesn't know about '%s' events",
libvlc_event_type_name(event_type) ); libvlc_event_type_name(event_type) );
assert(0); vlc_assert_unreachable();
return -1; return -1;
} }
......
...@@ -773,7 +773,7 @@ static int onMouseEvent(vlc_object_t *p_vout, const char *psz_var, vlc_value_t o ...@@ -773,7 +773,7 @@ static int onMouseEvent(vlc_object_t *p_vout, const char *psz_var, vlc_value_t o
bd_mouse_select(p_sys->bluray, now, val.coords.x, val.coords.y); bd_mouse_select(p_sys->bluray, now, val.coords.x, val.coords.y);
bd_user_input(p_sys->bluray, now, BD_VK_MOUSE_ACTIVATE); bd_user_input(p_sys->bluray, now, BD_VK_MOUSE_ACTIVATE);
} else { } else {
assert(0); vlc_assert_unreachable();
} }
return VLC_SUCCESS; return VLC_SUCCESS;
} }
......
...@@ -2108,7 +2108,7 @@ void en50221_Poll( cam_t * p_cam ) ...@@ -2108,7 +2108,7 @@ void en50221_Poll( cam_t * p_cam )
case CA_CI: case CA_CI:
return; return;
default: default:
assert( 0 ); vlc_assert_unreachable();
} }
for ( unsigned i_slot = 0; i_slot < p_cam->i_nb_slots; i_slot++ ) for ( unsigned i_slot = 0; i_slot < p_cam->i_nb_slots; i_slot++ )
......
...@@ -366,7 +366,7 @@ static ssize_t StreamRead (access_t *p_access, uint8_t *p_buffer, size_t i_len) ...@@ -366,7 +366,7 @@ static ssize_t StreamRead (access_t *p_access, uint8_t *p_buffer, size_t i_len)
static int NoSeek (access_t *p_access, uint64_t i_pos) static int NoSeek (access_t *p_access, uint64_t i_pos)
{ {
/* assert(0); ?? */ /* vlc_assert_unreachable(); ?? */
(void) p_access; (void) i_pos; (void) p_access; (void) i_pos;
return VLC_EGENERIC; return VLC_EGENERIC;
} }
......
...@@ -429,7 +429,7 @@ connect: ...@@ -429,7 +429,7 @@ connect:
break; break;
default: default:
assert(0); vlc_assert_unreachable();
} }
if( p_sys->i_code == 401 ) if( p_sys->i_code == 401 )
......
...@@ -2107,7 +2107,7 @@ static void* TimeoutPrevention( void *p_data ) ...@@ -2107,7 +2107,7 @@ static void* TimeoutPrevention( void *p_data )
msleep (((int64_t)p_timeout->p_sys->i_timeout - 2) * CLOCK_FREQ); msleep (((int64_t)p_timeout->p_sys->i_timeout - 2) * CLOCK_FREQ);
} }
assert(0); /* dead code */ vlc_assert_unreachable(); /* dead code */
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -1573,7 +1573,7 @@ static void *KeepAliveThread( void *p_data ) ...@@ -1573,7 +1573,7 @@ static void *KeepAliveThread( void *p_data )
msleep( 10 * CLOCK_FREQ ); msleep( 10 * CLOCK_FREQ );
} }
assert(0); vlc_assert_unreachable();
} }
static void KeepAliveStart( access_t *p_access ) static void KeepAliveStart( access_t *p_access )
......
...@@ -172,7 +172,7 @@ static int ControlSetCallback (vlc_object_t *obj, const char *var, ...@@ -172,7 +172,7 @@ static int ControlSetCallback (vlc_object_t *obj, const char *var,
ret = ControlSetStr (ctrl, cur.psz_string); ret = ControlSetStr (ctrl, cur.psz_string);
break; break;
default: default:
assert (0); vlc_assert_unreachable ();
} }
if (ret) if (ret)
......
...@@ -631,7 +631,7 @@ static void *MmapThread (void *data) ...@@ -631,7 +631,7 @@ static void *MmapThread (void *data)
#endif #endif
} }
assert (0); vlc_assert_unreachable ();
} }
static void *ReadThread (void *data) static void *ReadThread (void *data)
...@@ -693,7 +693,7 @@ static void *ReadThread (void *data) ...@@ -693,7 +693,7 @@ static void *ReadThread (void *data)
GrabVBI (demux, sys->vbi); GrabVBI (demux, sys->vbi);
#endif #endif
} }
assert (0); vlc_assert_unreachable ();
} }
static int DemuxControl( demux_t *demux, int query, va_list args ) static int DemuxControl( demux_t *demux, int query, va_list args )
......
...@@ -159,8 +159,7 @@ static inline uint32_t CanonicaliseChannels( uint32_t i_physical_channels ) ...@@ -159,8 +159,7 @@ static inline uint32_t CanonicaliseChannels( uint32_t i_physical_channels )
if( (i_physical_channels & ~valid_channels[i]) == 0 ) if( (i_physical_channels & ~valid_channels[i]) == 0 )
return valid_channels[i]; return valid_channels[i];
assert( false ); vlc_assert_unreachable();
return 0;
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -224,7 +224,7 @@ static int Start (audio_output_t *aout, audio_sample_format_t *fmt) ...@@ -224,7 +224,7 @@ static int Start (audio_output_t *aout, audio_sample_format_t *fmt)
fmt->i_physical_channels = AOUT_CHANS_7_1; fmt->i_physical_channels = AOUT_CHANS_7_1;
break; break;
default: default:
assert(0); vlc_assert_unreachable();
} }
fmt->i_format = VLC_CODEC_S16N; fmt->i_format = VLC_CODEC_S16N;
......
...@@ -611,8 +611,7 @@ JNIThread( void *data ) ...@@ -611,8 +611,7 @@ JNIThread( void *data )
&p_sys->p_cmd->out.time_get.i_delay ); &p_sys->p_cmd->out.time_get.i_delay );
break; break;
default: default:
assert( false ); vlc_assert_unreachable();
break;
} }
if( b_error ) if( b_error )
p_sys->b_thread_run = false; p_sys->b_thread_run = false;
......
...@@ -430,7 +430,7 @@ static void context_cb(pa_context *ctx, pa_subscription_event_type_t type, ...@@ -430,7 +430,7 @@ static void context_cb(pa_context *ctx, pa_subscription_event_type_t type,
break; break;
default: /* unsubscribed facility?! */ default: /* unsubscribed facility?! */
assert(0); vlc_assert_unreachable();
} }
} }
......
...@@ -479,7 +479,7 @@ static int Eia608GetWritingScreenIndex( eia608_t *h ) ...@@ -479,7 +479,7 @@ static int Eia608GetWritingScreenIndex( eia608_t *h )
return h->i_screen; return h->i_screen;
default: default:
/* It cannot happen, else it is a bug */ /* It cannot happen, else it is a bug */
assert( 0 ); vlc_assert_unreachable();
return 0; return 0;
} }
} }
......
...@@ -273,7 +273,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer ) ...@@ -273,7 +273,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
p_dec->fmt_out.i_codec = VLC_CODEC_WIDI_LPCM; p_dec->fmt_out.i_codec = VLC_CODEC_WIDI_LPCM;
break; break;
default: default:
assert(0); vlc_assert_unreachable();
case LPCM_BD: case LPCM_BD:
p_dec->fmt_out.i_codec = VLC_CODEC_BD_LPCM; p_dec->fmt_out.i_codec = VLC_CODEC_BD_LPCM;
break; break;
...@@ -451,7 +451,7 @@ static block_t *DecodeFrame( decoder_t *p_dec, block_t **pp_block ) ...@@ -451,7 +451,7 @@ static block_t *DecodeFrame( decoder_t *p_dec, block_t **pp_block )
AobExtract( p_aout_buffer, p_block, i_bits, p_aob_group ); AobExtract( p_aout_buffer, p_block, i_bits, p_aob_group );
break; break;
default: default:
assert(0); vlc_assert_unreachable();
case LPCM_BD: case LPCM_BD:
BdExtract( p_aout_buffer, p_block, i_frame_length, i_channels, i_channels_padding, i_bits ); BdExtract( p_aout_buffer, p_block, i_frame_length, i_channels, i_channels_padding, i_bits );
break; break;
...@@ -575,7 +575,7 @@ static block_t *EncodeFrames( encoder_t *p_enc, block_t *p_aout_buf ) ...@@ -575,7 +575,7 @@ static block_t *EncodeFrames( encoder_t *p_enc, block_t *p_aout_buf )
i_freq_code = 3; i_freq_code = 3;
break; break;
default: default:
assert(0); vlc_assert_unreachable();
} }
int i_bytes_consumed = 0; int i_bytes_consumed = 0;
......
...@@ -630,7 +630,7 @@ static void ProcessEvents( intf_thread_t *p_intf, ...@@ -630,7 +630,7 @@ static void ProcessEvents( intf_thread_t *p_intf,
break; break;
} }
default: default:
assert(0); vlc_assert_unreachable();
} }
free( p_events[i] ); free( p_events[i] );
} }
...@@ -1015,7 +1015,7 @@ static int AllCallback( vlc_object_t *p_this, const char *psz_var, ...@@ -1015,7 +1015,7 @@ static int AllCallback( vlc_object_t *p_this, const char *psz_var,
else if( !strcmp( "can-pause", psz_var ) ) else if( !strcmp( "can-pause", psz_var ) )
info.signal = SIGNAL_CAN_PAUSE; info.signal = SIGNAL_CAN_PAUSE;
else else
assert(0); vlc_assert_unreachable();
if( info.signal == SIGNAL_NONE ) if( info.signal == SIGNAL_NONE )
return VLC_SUCCESS; return VLC_SUCCESS;
......
...@@ -188,7 +188,7 @@ static void *RunIntf( void *data ) ...@@ -188,7 +188,7 @@ static void *RunIntf( void *data )
vlc_restorecancel( canc ); vlc_restorecancel( canc );
} }
assert(0); vlc_assert_unreachable();
} }
#undef LOW_THRESHOLD #undef LOW_THRESHOLD
#undef HIGH_THRESHOLD #undef HIGH_THRESHOLD
...@@ -194,7 +194,7 @@ static int GetOrientation( motion_sensors_t *motion ) ...@@ -194,7 +194,7 @@ static int GetOrientation( motion_sensors_t *motion )
return 0; return 0;
#endif #endif
default: default:
assert( 0 ); vlc_assert_unreachable();
} }
} }
......
...@@ -1540,7 +1540,7 @@ static int VideoConfig( vlc_object_t *p_this, char const *psz_cmd, ...@@ -1540,7 +1540,7 @@ static int VideoConfig( vlc_object_t *p_this, char const *psz_cmd,
} }
else else
/* This case can't happen */ /* This case can't happen */
assert( 0 ); vlc_assert_unreachable();
if( newval.psz_string && *newval.psz_string ) if( newval.psz_string && *newval.psz_string )
{ {
......
...@@ -220,7 +220,7 @@ static CGEventRef tapEventCallback2(CGEventTapProxy proxy, CGEventType type, CGE ...@@ -220,7 +220,7 @@ static CGEventRef tapEventCallback2(CGEventTapProxy proxy, CGEventType type, CGE
} }
@catch (NSException * e) { @catch (NSException * e) {
NSLog(@"Strange CGEventType: %d: %@", type, e); NSLog(@"Strange CGEventType: %d: %@", type, e);
assert(0); vlc_assert_unreachable();
return event; return event;
} }
......
...@@ -389,7 +389,7 @@ bool checkProgressPanel (void *priv) ...@@ -389,7 +389,7 @@ bool checkProgressPanel (void *priv)
ret = 3; ret = 3;
break; break;
default: default:
assert(0); vlc_assert_unreachable();
ret = 0; ret = 0;
break; break;
} }
...@@ -666,7 +666,7 @@ static NSView *createControlFromWidget(extension_widget_t *widget, id self) ...@@ -666,7 +666,7 @@ static NSView *createControlFromWidget(extension_widget_t *widget, id self)
return spinner; return spinner;
} }
default: default:
assert(0); vlc_assert_unreachable();
return nil; return nil;
} }
......
...@@ -94,7 +94,7 @@ int PLItem::id( int type ) ...@@ -94,7 +94,7 @@ int PLItem::id( int type )
return i_playlist_id; return i_playlist_id;
default: default:
case MLMEDIA_ID: case MLMEDIA_ID:
assert( 0 ); vlc_assert_unreachable();
return -1; return -1;
} }
} }
......
...@@ -787,7 +787,7 @@ void StandardPLPanel::cycleViews() ...@@ -787,7 +787,7 @@ void StandardPLPanel::cycleViews()
#endif #endif
showView( ICON_VIEW ); showView( ICON_VIEW );
else else
assert( 0 ); vlc_assert_unreachable();
} }
void StandardPLPanel::activate( const QModelIndex &index ) void StandardPLPanel::activate( const QModelIndex &index )
......
...@@ -149,7 +149,7 @@ void SoutDialog::addDest( ) ...@@ -149,7 +149,7 @@ void SoutDialog::addDest( )
caption = "Icecast"; caption = "Icecast";
break; break;
default: default:
assert(0); vlc_assert_unreachable();
return; return;
} }
......
...@@ -301,7 +301,7 @@ void InputManager::customEvent( QEvent *event ) ...@@ -301,7 +301,7 @@ void InputManager::customEvent( QEvent *event )
break; break;
default: default:
msg_Warn( p_intf, "This shouldn't happen: %i", i_type ); msg_Warn( p_intf, "This shouldn't happen: %i", i_type );
assert(0); vlc_assert_unreachable();
} }
} }
......
...@@ -693,7 +693,7 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg ) ...@@ -693,7 +693,7 @@ static int WindowOpen( vout_window_t *p_wnd, const vout_window_cfg_t *cfg )
p_wnd->handle.nsobject = (void *)wid; p_wnd->handle.nsobject = (void *)wid;
break; break;
default: default:
assert(0); vlc_assert_unreachable();
} }
p_wnd->control = WindowControl; p_wnd->control = WindowControl;
......
...@@ -381,7 +381,7 @@ static picture_t *VideoImport(filter_t *filter, picture_t *src) ...@@ -381,7 +381,7 @@ static picture_t *VideoImport(filter_t *filter, picture_t *src)
fmt.i_chroma = VLC_CODEC_VDPAU_VIDEO_444; fmt.i_chroma = VLC_CODEC_VDPAU_VIDEO_444;
break; break;
default: default:
assert(0); vlc_assert_unreachable();
} }
picture_t *dst = picture_NewFromFormat(&fmt); picture_t *dst = picture_NewFromFormat(&fmt);
...@@ -433,7 +433,7 @@ static picture_t *VideoRender(filter_t *filter, picture_t *src) ...@@ -433,7 +433,7 @@ static picture_t *VideoRender(filter_t *filter, picture_t *src)
case VDP_CHROMA_TYPE_420: fmt.i_chroma = VLC_CODEC_NV12; break; case VDP_CHROMA_TYPE_420: fmt.i_chroma = VLC_CODEC_NV12; break;
case VDP_CHROMA_TYPE_422: fmt.i_chroma = VLC_CODEC_UYVY; break; case VDP_CHROMA_TYPE_422: fmt.i_chroma = VLC_CODEC_UYVY; break;
case VDP_CHROMA_TYPE_444: fmt.i_chroma = VLC_CODEC_NV24; break; case VDP_CHROMA_TYPE_444: fmt.i_chroma = VLC_CODEC_NV24; break;
default: assert(0); default: vlc_assert_unreachable();
} }
picture_t *pic = picture_NewFromFormat(&fmt); picture_t *pic = picture_NewFromFormat(&fmt);
......
...@@ -248,7 +248,7 @@ static void *Run( void *data ) ...@@ -248,7 +248,7 @@ static void *Run( void *data )
vlc_restorecancel (canc); vlc_restorecancel (canc);
} }
vlc_cleanup_pop(); vlc_cleanup_pop();
assert(0); /* dead code */ vlc_assert_unreachable(); /* dead code */
} }
static int UrlsChange( vlc_object_t *p_this, char const *psz_var, static int UrlsChange( vlc_object_t *p_this, char const *psz_var,
......
...@@ -603,7 +603,7 @@ static void *Run( void *data ) ...@@ -603,7 +603,7 @@ static void *Run( void *data )
else if( timeout < 200 ) else if( timeout < 200 )
timeout = 200; /* Don't wakeup too fast. */ timeout = 200; /* Don't wakeup too fast. */
} }
assert (0); vlc_assert_unreachable ();
} }
/********************************************************************** /**********************************************************************
......
...@@ -1499,7 +1499,7 @@ static void *rtp_listen_thread( void *data ) ...@@ -1499,7 +1499,7 @@ static void *rtp_listen_thread( void *data )
vlc_restorecancel( canc ); vlc_restorecancel( canc );
} }
assert( 0 ); vlc_assert_unreachable();
} }
......
...@@ -486,7 +486,7 @@ int rtp_get_fmt( vlc_object_t *obj, es_format_t *p_fmt, const char *mux, ...@@ -486,7 +486,7 @@ int rtp_get_fmt( vlc_object_t *obj, es_format_t *p_fmt, const char *mux,
c1 = c2 = 4; c1 = c2 = 4;
break; break;
default: default:
assert(0); vlc_assert_unreachable();
} }
if( asprintf( &rtp_fmt->fmtp, if( asprintf( &rtp_fmt->fmtp,
...@@ -1550,7 +1550,7 @@ static int rtp_packetize_rawvideo( sout_stream_id_sys_t *id, block_t *in, vlc_fo ...@@ -1550,7 +1550,7 @@ static int rtp_packetize_rawvideo( sout_stream_id_sys_t *id, block_t *in, vlc_fo
i_xdec = i_ydec = 2; i_xdec = i_ydec = 2;
break; break;
default: default:
assert(0); vlc_assert_unreachable();
} }
static const int RTP_HEADER_LEN = 12; static const int RTP_HEADER_LEN = 12;
...@@ -1653,7 +1653,7 @@ static int rtp_packetize_rawvideo( sout_stream_id_sys_t *id, block_t *in, vlc_fo ...@@ -1653,7 +1653,7 @@ static int rtp_packetize_rawvideo( sout_stream_id_sys_t *id, block_t *in, vlc_fo
p_outdata += i_length; p_outdata += i_length;
p_data += i_length; p_data += i_length;
} }
else assert(0); else vlc_assert_unreachable();
} }
/* rtp common header */ /* rtp common header */
......
...@@ -336,7 +336,7 @@ int RenderPhosphor( filter_t *p_filter, ...@@ -336,7 +336,7 @@ int RenderPhosphor( filter_t *p_filter,
break; break;
default: default:
/* The above are the only possibilities, if there are no bugs. */ /* The above are the only possibilities, if there are no bugs. */
assert(0); vlc_assert_unreachable();
break; break;
} }
} }
......
...@@ -241,7 +241,7 @@ static void VerticalMirror( picture_t *p_pic, picture_t *p_outpic, int i_plane, ...@@ -241,7 +241,7 @@ static void VerticalMirror( picture_t *p_pic, picture_t *p_outpic, int i_plane,
RV32VerticalMirror( p_pic, p_outpic, i_plane, b_left_to_right ); RV32VerticalMirror( p_pic, p_outpic, i_plane, b_left_to_right );
break; break;
default: default:
assert( false ); vlc_assert_unreachable();
} }
} }
......
...@@ -192,7 +192,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic ) ...@@ -192,7 +192,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
PackedYUVPosterize( p_pic, p_outpic, level ); PackedYUVPosterize( p_pic, p_outpic, level );
break; break;
default: default:
assert( false ); vlc_assert_unreachable();
} }
return CopyInfoAndRelease( p_outpic, p_pic ); return CopyInfoAndRelease( p_outpic, p_pic );
...@@ -316,7 +316,7 @@ static void PackedYUVPosterize( picture_t *p_pic, picture_t *p_outpic, int i_lev ...@@ -316,7 +316,7 @@ static void PackedYUVPosterize( picture_t *p_pic, picture_t *p_outpic, int i_lev
u = *p_in++; u = *p_in++;
break; break;
default: default:
assert( false ); vlc_assert_unreachable();
} }
/* do posterization */ /* do posterization */
YuvPosterization( &posterized_y1, &posterized_y2, &posterized_u, YuvPosterization( &posterized_y1, &posterized_y2, &posterized_u,
...@@ -349,7 +349,7 @@ static void PackedYUVPosterize( picture_t *p_pic, picture_t *p_outpic, int i_lev ...@@ -349,7 +349,7 @@ static void PackedYUVPosterize( picture_t *p_pic, picture_t *p_outpic, int i_lev
*p_out++ = posterized_u; *p_out++ = posterized_u;
break; break;
default: default:
assert( false ); vlc_assert_unreachable();
} }
} }
p_in += p_pic->p[0].i_pitch - p_pic->p[0].i_visible_pitch; p_in += p_pic->p[0].i_pitch - p_pic->p[0].i_visible_pitch;
......
...@@ -330,7 +330,7 @@ static int Control (vout_display_t *vd, int query, va_list ap) ...@@ -330,7 +330,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
} }
case VOUT_DISPLAY_RESET_PICTURES: case VOUT_DISPLAY_RESET_PICTURES:
assert (0); vlc_assert_unreachable ();
default: default:
msg_Err (vd, "Unhandled request %d", query); msg_Err (vd, "Unhandled request %d", query);
case VOUT_DISPLAY_CHANGE_FULLSCREEN: case VOUT_DISPLAY_CHANGE_FULLSCREEN:
......
...@@ -217,7 +217,7 @@ static int Control (vout_display_t *vd, int query, va_list ap) ...@@ -217,7 +217,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
break; break;
#ifndef NDEBUG #ifndef NDEBUG
case VOUT_DISPLAY_RESET_PICTURES: // not needed case VOUT_DISPLAY_RESET_PICTURES: // not needed
assert(0); vlc_assert_unreachable();
#endif #endif
case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE: case VOUT_DISPLAY_CHANGE_DISPLAY_SIZE:
......
...@@ -315,7 +315,7 @@ static int Control(vout_display_t *vd, int query, va_list ap) ...@@ -315,7 +315,7 @@ static int Control(vout_display_t *vd, int query, va_list ap)
} }
case VOUT_DISPLAY_RESET_PICTURES: case VOUT_DISPLAY_RESET_PICTURES:
assert (0); vlc_assert_unreachable ();
default: default:
msg_Err(vd, "Unknown request %d", query); msg_Err(vd, "Unknown request %d", query);
case VOUT_DISPLAY_CHANGE_FULLSCREEN: case VOUT_DISPLAY_CHANGE_FULLSCREEN:
......
...@@ -376,7 +376,7 @@ static int Control (vout_display_t *vd, int query, va_list ap) ...@@ -376,7 +376,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
} }
case VOUT_DISPLAY_RESET_PICTURES: case VOUT_DISPLAY_RESET_PICTURES:
assert (0); vlc_assert_unreachable ();
default: default:
msg_Err (vd, "Unknown request in Mac OS X vout display"); msg_Err (vd, "Unknown request in Mac OS X vout display");
return VLC_EGENERIC; return VLC_EGENERIC;
......
...@@ -619,7 +619,7 @@ int CommonControl(vout_display_t *vd, int query, va_list args) ...@@ -619,7 +619,7 @@ int CommonControl(vout_display_t *vd, int query, va_list args)
EventThreadMouseHide(sys->event); EventThreadMouseHide(sys->event);
return VLC_SUCCESS; return VLC_SUCCESS;