r384 - trunk/code/tools/lcc/src

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Mon Nov 28 04:53:09 EST 2005


Author: icculus
Date: 2005-11-28 04:53:09 -0500 (Mon, 28 Nov 2005)
New Revision: 384

Modified:
   trunk/code/tools/lcc/src/c.h
   trunk/code/tools/lcc/src/enode.c
   trunk/code/tools/lcc/src/simp.c
Log:
Fixed some compiler warnings in lcc...mostly "long double" stuff.



Modified: trunk/code/tools/lcc/src/c.h
===================================================================
--- trunk/code/tools/lcc/src/c.h	2005-11-28 09:50:55 UTC (rev 383)
+++ trunk/code/tools/lcc/src/c.h	2005-11-28 09:53:09 UTC (rev 384)
@@ -81,7 +81,7 @@
 typedef union value {
 	long i;
 	unsigned long u;
-	long double d;
+	double d;
 	void *p;
 	void (*g)(void);
 } Value;

Modified: trunk/code/tools/lcc/src/enode.c
===================================================================
--- trunk/code/tools/lcc/src/enode.c	2005-11-28 09:50:55 UTC (rev 383)
+++ trunk/code/tools/lcc/src/enode.c	2005-11-28 09:53:09 UTC (rev 384)
@@ -184,7 +184,7 @@
 	switch (ty->op) {
 	case INT:     p->u.v.i = va_arg(ap, long); break;
 	case UNSIGNED:p->u.v.u = va_arg(ap, unsigned long)&ones(8*ty->size); break;
-	case FLOAT:   p->u.v.d = va_arg(ap, long double); break;
+	case FLOAT:   p->u.v.d = va_arg(ap, double); break;
 	case POINTER: p->u.v.p = va_arg(ap, void *); break;
 	default: assert(0);
 	}

Modified: trunk/code/tools/lcc/src/simp.c
===================================================================
--- trunk/code/tools/lcc/src/simp.c	2005-11-28 09:50:55 UTC (rev 383)
+++ trunk/code/tools/lcc/src/simp.c	2005-11-28 09:53:09 UTC (rev 384)
@@ -246,15 +246,15 @@
 			break;
 
 		case CVI+F:
-			xcvtcnst(I,l->u.v.i,ty,d,(long double)l->u.v.i);
+			xcvtcnst(I,l->u.v.i,ty,d,(double)l->u.v.i);
 		case CVU+F:
-			xcvtcnst(U,l->u.v.u,ty,d,(long double)l->u.v.u);
+			xcvtcnst(U,l->u.v.u,ty,d,(double)l->u.v.u);
 			break;
 		case CVF+I:
 			xcvtcnst(F,l->u.v.d,ty,i,(long)l->u.v.d);
 			break;
 		case CVF+F: {
-			float d;
+			float d = 0.0f;
 			if (l->op == CNST+F) {
 				if (l->u.v.d < ty->u.sym->u.limits.min.d)
 					d = ty->u.sym->u.limits.min.d;
@@ -263,7 +263,7 @@
 				else
 					d = l->u.v.d;
 			}
-			xcvtcnst(F,l->u.v.d,ty,d,(long double)d);
+			xcvtcnst(F,l->u.v.d,ty,d,(double)d);
 			break;
 			}
 		case BAND+U:




More information about the quake3-commits mailing list