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

Modified Files:
        sql_scenario.mx 
Log Message:

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

use the correct type: strlen returns size_t, NOT int

(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_scenario.mx
Index: sql_scenario.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_scenario.mx,v
retrieving revision 1.316
retrieving revision 1.317
diff -u -d -r1.316 -r1.317
--- sql_scenario.mx     12 Aug 2008 09:56:40 -0000      1.316
+++ sql_scenario.mx     31 Aug 2008 22:05:20 -0000      1.317
@@ -375,7 +375,7 @@
        
        if (sqlinit) { /* add sqlinit to the fdin stack */
                buffer *b = (buffer*)GDKmalloc(sizeof(buffer));
-               int len = strlen(sqlinit);
+               size_t len = strlen(sqlinit);
                bstream *fdin;
 
                buffer_init(b, _strdup(sqlinit), len);
@@ -512,7 +512,7 @@
        str msg = MAL_SUCCEED;
        Client c= MCgetClient();
        backend *sql = ((backend *) c->state[MAL_SCENARIO_PARSER]);
-       int len = strlen(*expr);
+       size_t len = strlen(*expr);
 
 #ifdef _SQL_COMPILE
        stream_printf(c->fdout, "#SQLstatement:%s\n", *expr);


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