Changeset: 7fd805aba9f6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7fd805aba9f6
Modified Files:
geom/monetdb5/geom.mx
monetdb5/mal/mal_interpreter.mx
monetdb5/mal/mal_parser.mx
monetdb5/mal/mal_session.mx
monetdb5/modules/atoms/batxml.mx
monetdb5/modules/mal/bbp.mx
monetdb5/modules/mal/clients.mx
monetdb5/modules/mal/language.mx
monetdb5/modules/mal/mal_io.mx
monetdb5/modules/mal/mal_mapi.mx
monetdb5/modules/mal/mdb.mx
monetdb5/modules/mal/remote.mx
monetdb5/modules/mal/tablet_sql.mx
monetdb5/optimizer/opt_support.mx
monetdb5/scheduler/run_octopus.mx
sql/backends/monet5/sql.mx
sql/backends/monet5/sql_bpm.c
sql/backends/monet5/sql_scenario.c
sql/backends/monet5/vaults/fits.c
sql/storage/bpm/bpm_storage.c
Branch: Aug2011
Log Message:
Fix printf format strings.
diffs (truncated from 854 to 300 lines):
diff --git a/geom/monetdb5/geom.mx b/geom/monetdb5/geom.mx
--- a/geom/monetdb5/geom.mx
+++ b/geom/monetdb5/geom.mx
@@ -957,7 +957,7 @@
GEOSGeom_destroy(geosGeometry);
if (ret != MAL_SUCCEED)
- throw(MAL, "geom.@1", ret);
+ throw(MAL, "geom.@1", "%s", ret);
return ret;
}
@@ -1030,7 +1030,7 @@
BBPreleaseref(bx->batCacheid);
BBPreleaseref(by->batCacheid);
BBPreleaseref(bo->batCacheid);
- throw(MAL, "geom.point", err);
+ throw(MAL, "geom.point", "%s", err);
}
tfastins_nocheck(bo, o, p, Tsize(bo));
GDKfree(p);
@@ -1189,7 +1189,7 @@
GEOSGeom_destroy(ga);
if (ret != MAL_SUCCEED)
- throw(MAL, "geom.@1", ret);
+ throw(MAL, "geom.@1", "%s", ret);
return ret;
}
@= analysis2
@@ -1221,7 +1221,7 @@
GEOSGeom_destroy(gb);
if (ret != MAL_SUCCEED)
- throw(MAL, "geom.@1", ret);
+ throw(MAL, "geom.@1", "%s", ret);
return ret;
}
@= analysis3
diff --git a/monetdb5/mal/mal_interpreter.mx b/monetdb5/mal/mal_interpreter.mx
--- a/monetdb5/mal/mal_interpreter.mx
+++ b/monetdb5/mal/mal_interpreter.mx
@@ -1691,7 +1691,7 @@
ret = NULL;
if (getVarType(mb, getDestVar(pci)) == TYPE_str) {
ret = createScriptException(mb, stkpc, MAL, NULL,
- stk->stk[getDestVar(pci)].val.sval);
+ "%s", stk->stk[getDestVar(pci)].val.sval);
}
@:skipToCatch(exceptionVar, @2, stk)@
if (stkpc == mb->stop)
diff --git a/monetdb5/mal/mal_parser.mx b/monetdb5/mal/mal_parser.mx
--- a/monetdb5/mal/mal_parser.mx
+++ b/monetdb5/mal/mal_parser.mx
@@ -1795,7 +1795,7 @@
sprintf(buf,"input%d",(int)(cntxt-mal_clients));
f = fopen(buf,"w");
if (f==NULL)
- showException(SYNTAX, "temp file not writeable", "");
+ showException(SYNTAX, "parser", "temp file not writeable");
while( (c=currChar(cntxt)) == '[' && c){
do {
if (f && c) fputc(c, f);
@@ -1804,8 +1804,8 @@
if (f && c && fputc(c, f) == EOF){
(void)fclose(f);
if (unlink(buf) < 0)
- showException(SYNTAX, "out of temp file space
and unable to unlink", "");
- showException(SYNTAX, "out of temp file space", "");
+ showException(SYNTAX, "parser", "out of temp
file space and unable to unlink");
+ showException(SYNTAX, "parser", "out of temp file
space");
return;
}
nextChar(cntxt);
@@ -2005,7 +2005,7 @@
*s++= '\n';
*s = 0;
if( s != buf+1 && strlen(buf)<1024){
- showException(SYNTAX, "parseError", buf);
+ showException(SYNTAX, "parseError", "%s", buf);
/* produce the position marker*/
s= buf;
i = position(cntxt) -1;
@@ -2019,7 +2019,7 @@
if( msg && strlen(msg))
snprintf(s,1020,"%s", msg);
skipToEnd(cntxt);
- showException(SYNTAX, "parseError", buf);
+ showException(SYNTAX, "parseError", "%s", buf);
return 0;
}
@}
diff --git a/monetdb5/mal/mal_session.mx b/monetdb5/mal/mal_session.mx
--- a/monetdb5/mal/mal_session.mx
+++ b/monetdb5/mal/mal_session.mx
@@ -680,7 +680,7 @@
msg = (str) runMAL(c, prg->def, 1, 0, c->glb, 0);
if (msg) {
str place = getExceptionPlace(msg);
- showException(getExceptionType(msg), place,
getExceptionMessage(msg));
+ showException(getExceptionType(msg), place, "%s",
getExceptionMessage(msg));
GDKfree(place);
if (!c->listing)
printFunction(c->fdout, c->curprg->def, 0, c->listing);
diff --git a/monetdb5/modules/atoms/batxml.mx b/monetdb5/modules/atoms/batxml.mx
--- a/monetdb5/modules/atoms/batxml.mx
+++ b/monetdb5/modules/atoms/batxml.mx
@@ -332,7 +332,7 @@
xmlFreeDoc(doc);
if (content != NULL)
GDKfree(content);
- throw(MAL, "xml.text", err );
+ throw(MAL, "xml.text", "%s", err );
}
@-
@@ -395,7 +395,7 @@
BBPunfix(bn->batCacheid);
if ( buf != NULL )
GDKfree(buf);
- throw(MAL, "xml.xml", err);
+ throw(MAL, "xml.xml", "%s", err);
}
str
@@ -454,7 +454,7 @@
GDKfree(buf);
BBPreleaseref(b->batCacheid);
BBPunfix(bn->batCacheid);
- throw(MAL, "xml.document",err);
+ throw(MAL, "xml.document", "%s", err);
}
str
@@ -533,7 +533,7 @@
GDKfree(buf);
BBPreleaseref(b->batCacheid);
BBPunfix(bn->batCacheid);
- throw(MAL, "xml.document", err);
+ throw(MAL, "xml.document", "%s", err);
}
str
@@ -649,7 +649,7 @@
GDKfree(buf);
if ( val != NULL)
GDKfree(val);
- throw(MAL, "batxml.options", err);
+ throw(MAL, "batxml.options", "%s", err);
}
str
@@ -705,7 +705,7 @@
BBPunfix(bn->batCacheid);
if ( buf != NULL)
GDKfree(buf);
- throw(MAL, "xml.comment", err);
+ throw(MAL, "xml.comment", "%s", err);
}
str
@@ -775,7 +775,7 @@
BBPunfix(bn->batCacheid);
if ( buf != NULL )
GDKfree(buf);
- throw(MAL, "xml.pi", err);
+ throw(MAL, "xml.pi", "%s", err);
}
str
@@ -854,7 +854,7 @@
BBPunfix(bn->batCacheid);
if ( buf != NULL )
GDKfree(buf);
- throw(MAL, "xml.root", err);
+ throw(MAL, "xml.root", "%s", err);
}
str
@@ -915,7 +915,7 @@
BBPunfix(bn->batCacheid);
if ( buf != NULL )
GDKfree(buf);
- throw(MAL, "xml.attribute", err);
+ throw(MAL, "xml.attribute", "%s", err);
}
str
@@ -1002,7 +1002,7 @@
BBPunfix(bn->batCacheid);
if ( buf != NULL )
GDKfree(buf);
- throw(MAL, "xml.element", err);
+ throw(MAL, "xml.element", "%s", err);
}
str
@@ -1105,7 +1105,7 @@
BBPunfix(bn->batCacheid);
if ( buf != NULL )
GDKfree(buf);
- throw(MAL, "xml.forest", err);
+ throw(MAL, "xml.forest", "%s", err);
}
str
@@ -1192,7 +1192,7 @@
BBPunfix(bn->batCacheid);
if ( buf != NULL)
GDKfree(buf);
- throw(MAL, "xml.concat", err);
+ throw(MAL, "xml.concat", "%s", err);
}
str
@@ -1302,7 +1302,7 @@
BBPunfix(bn->batCacheid);
if ( buf != NULL)
GDKfree(buf);
- throw(MAL, "xml.agg", err);
+ throw(MAL, "xml.agg", "%s", err);
}
str
@@ -1407,7 +1407,7 @@
BBPunfix(r->batCacheid);
if ( buf != NULL)
GDKfree(buf);
- throw(MAL, "xml.agg", err);
+ throw(MAL, "xml.agg", "%s", err);
}
str
@@ -1469,7 +1469,7 @@
BBPreleaseref(b->batCacheid);
if ( buf != NULL)
GDKfree(buf);
- throw(MAL, "xml.agg", err);
+ throw(MAL, "xml.agg", "%s", err);
}
str
diff --git a/monetdb5/modules/mal/bbp.mx b/monetdb5/modules/mal/bbp.mx
--- a/monetdb5/modules/mal/bbp.mx
+++ b/monetdb5/modules/mal/bbp.mx
@@ -765,7 +765,7 @@
if (isIdentifier(name)< 0)
throw(MAL, "bbp.take", IDENTIFIER_EXPECTED);
if (strstr(name, "M5system_auth") == name)
- throw(MAL, "bbp.take", INVCRED_ACCESS_DENIED,"");
+ throw(MAL, "bbp.take", INVCRED_ACCESS_DENIED);
v = getArgReference(stk,pci,0);
if (takeBox(box, name, v, (int) getArgType(mb, pci, 0))) {
int bid = BBPindex(name);
diff --git a/monetdb5/modules/mal/clients.mx b/monetdb5/modules/mal/clients.mx
--- a/monetdb5/modules/mal/clients.mx
+++ b/monetdb5/modules/mal/clients.mx
@@ -411,7 +411,7 @@
(void) mb; /* fool compiler */
if ( pci->argc==2 && cntxt->idx != 0)
- throw(MAL, "client.quit", INVCRED_ACCESS_DENIED,"");
+ throw(MAL, "client.quit", INVCRED_ACCESS_DENIED);
if ( pci->argc==2)
id = *(int*) getArgReference(stk,pci,1);
else id =cntxt->idx;
diff --git a/monetdb5/modules/mal/language.mx b/monetdb5/modules/mal/language.mx
--- a/monetdb5/modules/mal/language.mx
+++ b/monetdb5/modules/mal/language.mx
@@ -182,42 +182,42 @@
MALassertBit(int *ret, bit *val, str *msg){
(void) ret;
if( *val == 0 || *val == bit_nil)
- throw(MAL, "mal.assert",*msg);
+ throw(MAL, "mal.assert", "%s", *msg);
return MAL_SUCCEED;
}
str
MALassertInt(int *ret, int *val, str *msg){
(void) ret;
if( *val == 0 || *val == int_nil)
- throw(MAL, "mal.assert",*msg);
+ throw(MAL, "mal.assert", "%s", *msg);
return MAL_SUCCEED;
}
str
MALassertLng(int *ret, lng *val, str *msg){
(void) ret;
if( *val == 0 || *val == lng_nil)
- throw(MAL, "mal.assert",*msg);
+ throw(MAL, "mal.assert", "%s", *msg);
return MAL_SUCCEED;
}
str
MALassertSht(int *ret, sht *val, str *msg){
(void) ret;
if( *val == 0 || *val == sht_nil)
- throw(MAL, "mal.assert",*msg);
+ throw(MAL, "mal.assert", "%s", *msg);
return MAL_SUCCEED;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list