Update of /cvsroot/monetdb/sql/src/storage/restrict
In directory 
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv30574/src/storage/restrict

Modified Files:
        restrict_storage.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
):

properly downcast ssize_t to oid (incl. assertion for overflow check)

(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 restrict_storage.mx
Index: restrict_storage.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/storage/restrict/restrict_storage.mx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- restrict_storage.mx 25 Aug 2008 13:36:21 -0000      1.8
+++ restrict_storage.mx 31 Aug 2008 22:10:49 -0000      1.9
@@ -153,7 +153,8 @@
                }
                bat_destroy(u);
        }
-       void_inplace(b, rid, upd, TRUE);
+       assert(rid > 0 && (lng) rid <= (lng) GDK_oid_max);
+       void_inplace(b, (oid)rid, upd, TRUE);
        bat_destroy(b);
 }
 


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