Changeset: 03ae7c3004ed for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=03ae7c3004ed
Modified Files:
sql/backends/monet5/sql.c
sql/server/rel_updates.c
Branch: fixed-width-format
Log Message:
make it compile with strict compiler flags
diffs (30 lines):
diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -3518,7 +3518,7 @@ mvc_import_table_wrap(Client cntxt, MalB
/* overwrite other delimiters to the ones the FWF
stream uses */
sprintf((char*) tsep, "%c", STREAM_FWF_FIELD_SEP);
sprintf((char*) rsep, "%c", STREAM_FWF_RECORD_SEP);
- sprintf((char*) ssep, "");
+ ssep[0] = 0;
ss = stream_fwf_create(ss, ncol, widths,
STREAM_FWF_FILLER);
}
diff --git a/sql/server/rel_updates.c b/sql/server/rel_updates.c
--- a/sql/server/rel_updates.c
+++ b/sql/server/rel_updates.c
@@ -1161,11 +1161,10 @@ rel_import(mvc *sql, sql_table *t, char
if (fwf_widths && dlist_length(fwf_widths) > 0) {
dnode *dn;
int ncol = 0;
- fwf_string = GDKmalloc(20 * dlist_length(fwf_widths) + 1); // a
64 bit int needs 19 characters in decimal representation plus the separator
- if (!fwf_string) {
+ char* fwf_string_cur = fwf_string = GDKmalloc(20 *
dlist_length(fwf_widths) + 1); // a 64 bit int needs 19 characters in decimal
representation plus the separator
+
+ if (!fwf_string)
return NULL;
- }
- char* fwf_string_cur = fwf_string;
for (dn = fwf_widths->h; dn; dn = dn->next) {
fwf_string_cur += sprintf(fwf_string_cur, LLFMT"%c",
dn->data.l_val, STREAM_FWF_FIELD_SEP);
ncol++;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list