[MPlayer-dev-eng] radeon_vid.c and gcc 3.0.3

Marek Pętlicki marpet at linuxpl.org
Sat Jan 26 19:42:04 CET 2002


I get this when compiling latest CVS with gcc 3.0.3: 

gcc -c -O4 -march=athlon -mcpu=athlon -pipe -ffast-math
-fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -fPIC -I. -I.. -Wall -W -o
radeon_vid.o radeon_vid.c 
In file included from radeon_vid.c:18: 
../../libdha/libdha.h:65:6: warning: no newline at end of file 
radeon_vid.c:664:1: directives may not be used inside a macro argument 
radeon_vid.c:664:1: unterminated argument list invoking macro "printf" 
radeon_vid.c: In function `vixProbe': 
radeon_vid.c:667: parse error before string constant 
radeon_vid.c:662: warning: empty body in an if-statement 
make: *** [radeon_vid.o] Error 1 

if it was reported before, sorry, I haven't followed the list recently. 

Problem is with using ifdefs inside a function, attached small patch
fixes it well (saving ~38 bytes is not worth compatibility loss ;-). 

regards 

-- 
Marek Pętlicki <marpet at linuxpl.org>
Linux User ID=162988
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20020126/69ad60bc/attachment.htm>
-------------- next part --------------
Index: vidix/drivers/radeon_vid.c
===================================================================
RCS file: /cvsroot/mplayer/main/vidix/drivers/radeon_vid.c,v
retrieving revision 1.23
diff -u -u -r1.23 radeon_vid.c
--- vidix/drivers/radeon_vid.c	23 Jan 2002 19:34:59 -0000	1.23
+++ vidix/drivers/radeon_vid.c	26 Jan 2002 18:44:48 -0000
@@ -660,13 +660,11 @@
 	{
 	    printf(RADEON_MSG" Driver was forced. Was found %sknown chip\n",idx == -1 ? "un" : "");
 	    if(idx == -1)
-		printf(RADEON_MSG" Assuming it as %s\n",
 #ifdef RAGE128
-		"Rage128"
+		printf(RADEON_MSG" Assuming it as %s\n", "Rage128");
 #else
-		"Radeon1"
+		printf(RADEON_MSG" Assuming it as %s\n", "Radeon1");
 #endif
-		);
 	}
 	def_cap.device_id = lst[i].device;
 	err = 0;


More information about the MPlayer-dev-eng mailing list