aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoricculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-28 09:53:09 +0000
committericculus <icculus@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-11-28 09:53:09 +0000
commit6fbbf139bb874dfa2f31ab04c68157abcfe20351 (patch)
tree2ac48394e0c2c0d7784ddecfd751b405eb986930
parenta1ffde619ca3a48d7a4a88e17b5fc4328f0f3c71 (diff)
downloadioquake3-aero-6fbbf139bb874dfa2f31ab04c68157abcfe20351.tar.gz
ioquake3-aero-6fbbf139bb874dfa2f31ab04c68157abcfe20351.zip
Fixed some compiler warnings in lcc...mostly "long double" stuff.
git-svn-id: svn://svn.icculus.org/quake3/trunk@384 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r--code/tools/lcc/src/c.h2
-rw-r--r--code/tools/lcc/src/enode.c2
-rw-r--r--code/tools/lcc/src/simp.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/code/tools/lcc/src/c.h b/code/tools/lcc/src/c.h
index b46cf3b..e36380e 100644
--- a/code/tools/lcc/src/c.h
+++ b/code/tools/lcc/src/c.h
@@ -81,7 +81,7 @@ typedef struct table *Table;
typedef union value {
long i;
unsigned long u;
- long double d;
+ double d;
void *p;
void (*g)(void);
} Value;
diff --git a/code/tools/lcc/src/enode.c b/code/tools/lcc/src/enode.c
index 0f2adbd..760096d 100644
--- a/code/tools/lcc/src/enode.c
+++ b/code/tools/lcc/src/enode.c
@@ -184,7 +184,7 @@ Tree cnsttree(Type ty, ...) {
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);
}
diff --git a/code/tools/lcc/src/simp.c b/code/tools/lcc/src/simp.c
index 227dfbb..ea26ab6 100644
--- a/code/tools/lcc/src/simp.c
+++ b/code/tools/lcc/src/simp.c
@@ -246,15 +246,15 @@ Tree simplify(int op, Type ty, Tree l, Tree r) {
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 @@ Tree simplify(int op, Type ty, Tree l, Tree r) {
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: