[vlc-devel] commit: Workaround warning on function returned value casted. ( Laurent Aimar )

git version control git at videolan.org
Mon Aug 24 22:43:23 CEST 2009


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Aug 24 22:25:20 2009 +0200| [75171d2be520fe45362ecbed126d9e6c3231d046] | committer: Laurent Aimar 

Workaround warning on function returned value casted.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=75171d2be520fe45362ecbed126d9e6c3231d046
---

 modules/demux/nuv.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/modules/demux/nuv.c b/modules/demux/nuv.c
index 99cad83..85011cd 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;
 




More information about the vlc-devel mailing list