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

Modified Files:
        sql_gencode.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_gencode.mx
Index: sql_gencode.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet4/sql_gencode.mx,v
retrieving revision 1.177
retrieving revision 1.178
diff -u -d -r1.177 -r1.178
--- sql_gencode.mx      17 Jun 2008 10:34:58 -0000      1.177
+++ sql_gencode.mx      1 Sep 2008 07:51:20 -0000       1.178
@@ -71,10 +71,10 @@
                }
 @)
 
-static int 
+static size_t
 column_namelen( sql_column *c )
 {
-       int len = 0;
+       size_t len = 0;
 
        if (c->t->s)
                len += strlen(c->t->s->base.name);
@@ -83,10 +83,10 @@
        return len + strlen(c->t->base.name) + strlen(c->base.name); 
 }
 
-static int 
+static size_t
 idx_namelen( sql_idx *i )
 {
-       int len = 0;
+       size_t len = 0;
 
        if (i->t->s)
                len += strlen(i->t->s->base.name);
@@ -95,10 +95,10 @@
        return len + strlen(i->t->base.name) + strlen(i->base.name); 
 }
 
-static int 
+static size_t
 table_namelen( sql_table *t )
 {
-       int len = 0;
+       size_t len = 0;
 
        if (t->s)
                len += strlen(t->s->base.name);
@@ -301,7 +301,7 @@
 }
 
 static void
-dump(backend *sql, char *buf, int len, int nr)
+dump(backend *sql, char *buf, ssize_t len, int nr)
 {
        if (len == -1)
                len = _strlen(buf);


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