Update of /cvsroot/monetdb/sql/src/server
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv10139/src/server

Modified Files:
        sql_env.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_env.mx
Index: sql_env.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/server/sql_env.mx,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- sql_env.mx  29 Aug 2008 17:03:46 -0000      1.70
+++ sql_env.mx  31 Aug 2008 21:51:25 -0000      1.71
@@ -86,7 +86,7 @@
        if (strcmp(name, "debug") == 0) {
                sgn = stack_get_number(m, "debug");
                assert((lng) GDK_int_min <= sgn && sgn <= (lng) GDK_int_max);
-               m->debug = sgn;
+               m->debug = (int) sgn;
        } else if (strcmp(name, "current_schema") == 0) {
                char *schema = stack_get_string(m, "current_schema");
 
@@ -102,11 +102,11 @@
        } else if (strcmp(name, "current_timezone") == 0) {
                sgn = stack_get_number(m, "current_timezone") / 60;
                assert((lng) GDK_int_min <= sgn && sgn <= (lng) GDK_int_max);
-               m->timezone = sgn;
+               m->timezone = (int) sgn;
        } else if (strcmp(name, "cache") == 0) {
                sgn = stack_get_number(m, "cache");
                assert((lng) GDK_int_min <= sgn && sgn <= (lng) GDK_int_max);
-               m->cache = sgn;
+               m->cache = (int) sgn;
        }
        return NULL;
 }


-------------------------------------------------------------------------
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