[MPlayer-dev-eng] [PATCH] Compiler warnings almost gone :)

Dominik Mierzejewski dominik at rangers.eu.org
Thu Jan 9 22:18:01 CET 2003


After the last few patches I'm almost done with eliminating compiler
warnings. :) Only a few worth mentioning remain. Two, in particular, are
probably easy to fix by the maintainers:

pl_format.c:231: warning: suggest parentheses around + or - inside shift
vo_dga.c:580: warning: suggest parentheses around && within ||

Is the attached patch a good fix?

-- 
MPlayer RPMs maintainer: http://www.piorunek.pl/~dominik/linux/pkgs/mplayer/
"The Universe doesn't give you any points for doing things that are easy."
        -- Sheridan to Garibaldi in Babylon 5:"The Geometry of Shadows"
-------------- next part --------------
--- MPlayer-20030109/libao2/pl_format.c.warn	Fri Aug 23 03:41:12 2002
+++ MPlayer-20030109/libao2/pl_format.c	Thu Jan  9 22:00:15 2003
@@ -228,7 +228,7 @@
       switch(pl_format.in&SIGN_MASK){
       case(US):
 	for(i=0;i<len;i++)
-	((int32_t*)in_data)[i]=(int32_t)(-(1<<31-1)+((uint32_t*)in_data)[i]);
+	((int32_t*)in_data)[i]=(int32_t)(-(1<<(31-1))+((uint32_t*)in_data)[i]);
 	break;
       case(SI):
 	for(i=0;i<len;i++)
--- MPlayer-20030109/libvo/vo_dga.c.warn	Mon Nov 11 16:20:25 2002
+++ MPlayer-20030109/libvo/vo_dga.c	Thu Jan  9 22:10:21 2003
@@ -555,6 +555,7 @@
        // as long as it's above 50 Hz (acki2 on 30/3/2001)
        ||
        (
+       (
 	(new_x == *old_x) &&
 	(new_y == *old_y) &&
 	(
@@ -568,6 +569,7 @@
 	  new_vbi >= 50
 	 )
 	)
+       )
         ||
         // if everything is equal, then use the mode with the lower 
         // stride 


More information about the MPlayer-dev-eng mailing list