src/simulator/wireframe-simulator/core/vpLex.c assumes that the plain chars CURC and NEXTC can hold -1 (EOF) or -2 (EOB), and hence fails if char is unsigned.

This is the default on arm*/powerpc/s390, hence this bug, and can be tested elsewhere using -funsigned-char. The attached fixes this by explicitly casting them to signed char.

I don't know what's wrong on ia64; given that the last "successful" build on it was before the test suite was added (and hence may well be just as broken), and that this package is a transition blocker for coin3/opencv2.4/libav9, would it make sense to remove it on that architecture?
diff -up /home/palmer/flightgear_source/ViSP-2.8.0/src/simulator/wireframe-simulator/core/vpLex.c_orig /home/palmer/flightgear_source/ViSP-2.8.0/src/simulator/wireframe-simulator/core/vpLex.c
--- /home/palmer/flightgear_source/ViSP-2.8.0/src/simulator/wireframe-simulator/core/vpLex.c_orig	2013-09-22 11:58:14.822567806 +0100
+++ /home/palmer/flightgear_source/ViSP-2.8.0/src/simulator/wireframe-simulator/core/vpLex.c	2013-09-22 12:57:05.754575672 +0100
@@ -239,9 +239,9 @@ void close_lex (void)
 
 
 #define	ECHO	printf ("%c", *(mysptr))
-#define	CURC	(*mysptr)	/* caractere courant	*/
-#define	NEXTC	(*(mysptr+1))	/* caractere suivant	*/
-#define	PREVC	(*(mysptr-1))	/* caractere precedent	*/
+#define	CURC	(*((signed char *)mysptr))	/* caractere courant	*/
+#define	NEXTC	(*((signed char *)mysptr+1))	/* caractere suivant	*/
+#define	PREVC	(*((signed char *)mysptr-1))	/* caractere precedent	*/
 
 
 /*

Reply via email to