Add casts to get rid of warnings
authorbdemsky <bdemsky>
Wed, 1 Nov 2006 19:48:48 +0000 (19:48 +0000)
committerbdemsky <bdemsky>
Wed, 1 Nov 2006 19:48:48 +0000 (19:48 +0000)
Robust/src/IR/Flat/BuildCode.java

index 0169d96752f2fafd53bc5b828b1fcc30ab7e136d..e2f9a9e2602a0185fabbc64ccf64a2c12705fd9d 100644 (file)
@@ -1055,6 +1055,9 @@ public class BuildCode {
            needcomma=true;
        } else {
            if (fc.getThis()!=null) {
+               TypeDescriptor ptd=md.getThis().getType();
+               if (ptd.isClass()&&!ptd.isArray())
+                   output.print("(struct "+ptd.getSafeSymbol()+" *) ");
                output.print(generateTemp(fm,fc.getThis()));
                needcomma=true;
            }
@@ -1066,6 +1069,10 @@ public class BuildCode {
                TempDescriptor targ=fc.getArg(i);
                if (needcomma)
                    output.print(", ");
+
+               TypeDescriptor ptd=md.getParamType(i);
+               if (ptd.isClass()&&!ptd.isArray())
+                   output.print("(struct "+ptd.getSafeSymbol()+" *) ");
                output.print(generateTemp(fm, targ));
                needcomma=true;
            }