Update of /cvsroot/monetdb/MonetDB4/src/modules/plain
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19129

Modified Files:
        arith.mx 
Log Message:
Fix warning: conversion from 'int' to 'flt', possible loss of data

Also put parentheses in correct places in macros.


Index: arith.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB4/src/modules/plain/arith.mx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- arith.mx    11 Jan 2008 10:38:54 -0000      1.5
+++ arith.mx    16 Jan 2008 10:47:53 -0000      1.6
@@ -410,9 +410,9 @@
 @:check_unop(_INV,arith_inv,flt,"Cannot take inverse of zero")@
 @:check_unop(_INV,arith_inv,dbl,"Cannot take inverse of zero")@
 
-#define arith_abs(s) ((s)<0)?-(s):(s)
+#define arith_abs(s) ((s) < 0 ? -(s) : (s))
 #define arith_neg(s) (-(s))
-#define arith_sign(s) ((s)<0)?-1:((s)==0)?0:1
+#define arith_sign(s) ((s) < 0 ? -1 : (s) == 0 ? 0 : 1)
 @= c_unary_ops
 @:arith_unop(_ABS,arith_abs,@1)@
 @:arith_unop(_NEG,arith_neg,@1)@
@@ -709,7 +709,7 @@
        if (*a == @3_nil) {
                *res = @3_nil;
        } else {
-               *res = @2 (*a);
+               *res = (@3) (@2 (*a));
        }
        return(GDK_SUCCEED);
 }


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to