[MPlayer-dev-eng] [PATCH] a few warnings (mpeg_hdr.c)

Dominik 'Rathann' Mierzejewski dominik at rangers.eu.org
Wed Mar 2 00:13:41 CET 2005


Hi.

Attached patch fixes:
mpeg_hdr.c:212: warning: no return statement in function returning non-void
mpeg_hdr.c:262: warning: suggest parentheses around assignment used as truth value
mpeg_hdr.c:264: warning: suggest parentheses around assignment used as truth value
mpeg_hdr.c:270: warning: suggest parentheses around assignment used as truth value
mpeg_hdr.c:275: warning: suggest parentheses around assignment used as truth value
mpeg_hdr.c:212: warning: control reaches end of non-void function

mp4_header_process_vop() return value isn't used anywhere anyway.
If there are no objections, I'll apply it in a couple of days.

Regards,
R.

-- 
MPlayer RPMs maintainer: http://rpm.greysector.net/mplayer/
"I am Grey. I stand between the candle and the star. We are Grey.
 We stand between the darkness ... and the light."
        -- Delenn in Grey Council in Babylon 5:"Babylon Squared"
-------------- next part --------------
--- MPlayer-20050228/libmpdemux/mpeg_hdr.c.warn	2005-02-28 01:17:14.000000000 +0100
+++ MPlayer-20050228/libmpdemux/mpeg_hdr.c	2005-02-28 02:26:03.000000000 +0100
@@ -197,7 +198,7 @@
     return 0;
 }
 
-int mp4_header_process_vop(mp_mpeg_header_t * picture, unsigned char * buffer)
+void mp4_header_process_vop(mp_mpeg_header_t * picture, unsigned char * buffer)
 {
   int n;
   n = 0;
@@ -259,20 +260,20 @@
     }
   }
   
-  if(overscan=getbits(buf, n++, 1))
+  if((overscan=getbits(buf, n++, 1)))
     n++;
-  if(vsp_color=getbits(buf, n++, 1))
+  if((vsp_color=getbits(buf, n++, 1)))
   {
     n += 4;
     if(getbits(buf, n++, 1))
       n += 24;
   }
-  if(chroma=getbits(buf, n++, 1))
+  if((chroma=getbits(buf, n++, 1)))
   {
     read_golomb(buf, &n);
     read_golomb(buf, &n);
   }
-  if(timing=getbits(buf, n++, 1))
+  if((timing=getbits(buf, n++, 1)))
   {
     picture->timeinc_unit = (getbits(buf, n, 8) << 24) | (getbits(buf, n+8, 8) << 16) | (getbits(buf, n+16, 8) << 8) | getbits(buf, n+24, 8);
     n += 32;
--- MPlayer-20050228/libmpdemux/mpeg_hdr.h.warn	2005-02-28 01:17:14.000000000 +0100
+++ MPlayer-20050228/libmpdemux/mpeg_hdr.h	2005-02-28 02:24:53.000000000 +0100
@@ -23,5 +23,5 @@
 int mp_header_process_sequence_header (mp_mpeg_header_t * picture, unsigned char * buffer);
 int mp_header_process_extension (mp_mpeg_header_t * picture, unsigned char * buffer);
 int mp4_header_process_vol(mp_mpeg_header_t * picture, unsigned char * buffer);
-int mp4_header_process_vop(mp_mpeg_header_t * picture, unsigned char * buffer);
+void mp4_header_process_vop(mp_mpeg_header_t * picture, unsigned char * buffer);
 int h264_parse_sps(mp_mpeg_header_t * picture, unsigned char * buf, int len);


More information about the MPlayer-dev-eng mailing list