[perform casting of return values of c calls to avoid spurious warnings from c compiler
John Meacham <john@repetae.net>**20080311181707] hunk ./C/FromGrin2.hs 216
-forceHint _ Op.TyBool = Op.TyBool
-forceHint h (Op.TyBits b _) = Op.TyBits b h
-
hunk ./C/FromGrin2.hs 293
-    let cp (Lit i _) = constant (number $ fromIntegral i)
+    let cp ~(Lit i _) = constant (number $ fromIntegral i)
hunk ./C/FromGrin2.hs 530
-    f (ValPrim (APrim p _) [] _) = case p of
+    f (ValPrim (APrim p _) [] ty) = case p of
hunk ./C/FromGrin2.hs 532
-        AddrOf t -> return $ expressionRaw ('&':unpackPS t)
+        AddrOf t -> do rt <- convertType ty; return . cast rt $ expressionRaw ('&':unpackPS t)
hunk ./C/FromGrin2.hs 563
-        return $ cast (basicType r) (functionCall (name $ unpackPS n) [ cast (basicType t) v | v <- vs' | t <- as ])
+        rt <- convertTypes ty
+        return $ cast (rt) (functionCall (name $ unpackPS n) [ cast (basicType t) v | v <- vs' | t <- as ])
hunk ./C/FromGrin2.hs 567
+        rt <- convertTypes ty
hunk ./C/FromGrin2.hs 569
-        return $ cast (basicType r) (indirectFunctionCall fn [ cast (basicType t) v | v <- vs' | t <- as ])
+        return $ cast (rt) (indirectFunctionCall fn [ cast (basicType t) v | v <- vs' | t <- as ])
hunk ./C/FromGrin2.hs 578
-        return $ expressionRaw ('&':unpackPS t)
+        rt <- convertTypes ty
+        return . cast rt $ expressionRaw ('&':unpackPS t)