Re: [Monetdb-developers] [Monetdb-pf-checkins] pathfinder/runtime pf_support.mx, 1.233, 1.234
Peter,
triggered by --enable-optimize compilation warning about ======== .../pathfinder/runtime/pf_support.mx: In function 'CMDws_bat': .../pathfinder/runtime/pf_support.mx:7122: warning: 'v' may be used uninitialized in this function ========
I changed BAT *v, *b = BBPdescriptor(bid); into BAT *v = 0, *b = BBPdescriptor(bid);
in CMDws_bat(),
and noticed that CMDws_bat() returns GDK_SUCCEED in any case, now, although *ret is initialized/set only in case b = BBPdescriptor(bid) is non-null.
Is this --- i.e., returning GDK_SUCCEED and not initializing *ret in case b = BBPdescriptor(bid) return NULL --- intended / OK?
Stefan
On Wed, May 16, 2007 at 10:08:57AM +0000, Peter Boncz wrote:
Update of /cvsroot/monetdb/pathfinder/runtime In directory sc8-pr-cvs16:/tmp/cvs-serv3794
Modified Files: pf_support.mx Log Message: [ 1718066 ] PF: put() to /tmp crashes Mserver
- error in error message formatting
Index: pf_support.mx
RCS file: /cvsroot/monetdb/pathfinder/runtime/pf_support.mx,v retrieving revision 1.233 retrieving revision 1.234 diff -u -d -r1.233 -r1.234 --- pf_support.mx 16 May 2007 07:55:53 -0000 1.233 +++ pf_support.mx 16 May 2007 10:08:54 -0000 1.234 @@ -699,7 +699,7 @@ } var absolute := [or](filepath.[startsWith]("/"), filepath.[startsWith]("\")).uselect(true).mirror().leftfetchjoin(sel); if (count(absolute) > 0) {
ERROR("fn_put: file URI '%s' must be a relative path (%d such errors).", backwards.fetch(0), count(backwards));
} var backwards := filepath.[search]("..").uselect(0,int_nil).mirror().leftfetchjoin(sel); if (count(backwards) > 0) {ERROR("fn_put: file URI '%s' must be a relative path (%d such errors).", absolute.fetch(0), count(absolute));
@@ -7118,13 +7118,19 @@ int CMDws_bat(BAT **ret, lng* wsid) { bat bid = *wsid & 1073741823LL;
- BAT *v = NULL; if (BBPfix(bid)) {
BAT *b = BBPdescriptor(bid);
BAT *v, *b = BBPdescriptor(bid); if (b) *ret = v = VIEWcreate(b); BBPunfix(bid);
- if (v) {
/* give the view a name such that lng(bbname(v)) = lng(bbpname(b)) */
long_str buf;
snprintf(buf, sizeof(buf), "%s-%d", BBP_logical(bid), ABS(b->batCacheid));
BBPrename(v->batCacheid, buf);
return GDK_SUCCEED;
}}
- return v?GDK_SUCCEED:GDK_FAIL;
- return GDK_SUCCEED;
}
#include "serialize.h"
This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Monetdb-pf-checkins mailing list Monetdb-pf-checkins@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins
participants (1)
-
Stefan Manegold