From: Laurent Aimar Date: Mon, 24 Aug 2009 20:25:20 +0000 (+0200) Subject: Workaround warning on function returned value casted. X-Git-Tag: 1.1.0-ff~3948 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=75171d2be520fe45362ecbed126d9e6c3231d046;hp=9ae21742fae1c166888bf32c7f13e898275f678f;p=vlc Workaround warning on function returned value casted. --- diff --git a/modules/demux/nuv.c b/modules/demux/nuv.c index 99cad8397b..85011cdf64 100644 --- a/modules/demux/nuv.c +++ b/modules/demux/nuv.c @@ -461,9 +461,14 @@ static int Control( demux_t *p_demux, int i_query, va_list args ) { i64 = stream_Size( p_demux->s ); if( i64 > 0 ) - *pf = (double)stream_Tell( p_demux->s ) / (double)i64; + { + const double f_current = stream_Tell( p_demux->s ); + *pf = f_current / (double)i64; + } else + { *pf = 0.0; + } } return VLC_SUCCESS;