Update of /cvsroot/monetdb/sql/src/backends/monet4
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25388/src/backends/monet4

Modified Files:
        sql_server.mx 
Log Message:

finishing/fixing my yesterday's checking:

Tyring to fix the code that triggers some of the 120
"conversion from <type1> to <type2>, possible loss of data"
warnings with the Microsoft compiler on Windows (cf.,
http://monetdb.cwi.nl/testing/projects/monetdb/Current/sql/.Mic.32.32.d.1-Windows5.1..2008.08.29_00-09-02/make.out.html
):

added explicite downcasts, triggering assertions in case of overflows.

(Check the effect tomorrow at
http://monetdb.cwi.nl/testing/projects/monetdb/Current/sql/.Mic.32.32.d.1-Windows5.1/make.out.html
and
http://monetdb.cwi.nl/testing/projects/monetdb/Current/sql/.Mic.64.64.d.1-Windows5.2/make.out.html
)

Most of the remaining warnings are due to the fact that
member "ival" of struct "symbdata" in src/server/sql_symbol.mx
is defined as "lng" but often used as / assigned to "int"
(without cast or overflow check).
I will try to find a proper solution for this together with
Niels and/or Sjoerd...


U sql_server.mx
Index: sql_server.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet4/sql_server.mx,v
retrieving revision 1.202
retrieving revision 1.203
diff -u -d -r1.202 -r1.203
--- sql_server.mx       29 Aug 2008 17:03:45 -0000      1.202
+++ sql_server.mx       31 Aug 2008 15:53:13 -0000      1.203
@@ -977,7 +977,7 @@
                else
                        lres = (((*v - rnd)/scales[dff])*scales[dff]);
                assert((lng) [EMAIL PROTECTED] <= lres && lres <= (lng) [EMAIL 
PROTECTED]);
-               *res = lres;
+               *res = (@1) lres;
        } else if (*r <= 0 && -*r + *s > 0) {
                int dff = -*r + *s;
                lng rnd = scales[dff]>>1;
@@ -987,7 +987,7 @@
                else
                        lres = (((*v - rnd)/scales[dff])*scales[dff]);
                assert((lng) [EMAIL PROTECTED] <= lres && lres <= (lng) [EMAIL 
PROTECTED]);
-               *res = lres;
+               *res = (@1) lres;
        } else {
                *res = *v;
        }


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to