Changeset: e522a1ff4b95 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e522a1ff4b95
Modified Files:
clients/mapiclient/dotmonetdb.c
clients/mapiclient/tachograph.c
clients/mapiclient/tomograph.c
monetdb5/modules/mal/mdb.c
Branch: Apr2019
Log Message:
Fix some complaints by a discerning compiler.
diffs (51 lines):
diff --git a/clients/mapiclient/dotmonetdb.c b/clients/mapiclient/dotmonetdb.c
--- a/clients/mapiclient/dotmonetdb.c
+++ b/clients/mapiclient/dotmonetdb.c
@@ -39,9 +39,9 @@ parse_dotmonetdb(char **user, char **pas
/* empty environment variable: skip the file */
cfile = NULL;
} else if ((config = fopen(cfile, "r")) == NULL) {
- cfile = NULL;
fprintf(stderr, "failed to open file '%s': %s\n",
cfile, strerror(errno));
+ cfile = NULL;
} else {
cfile = strdup(cfile);
}
diff --git a/clients/mapiclient/tachograph.c b/clients/mapiclient/tachograph.c
--- a/clients/mapiclient/tachograph.c
+++ b/clients/mapiclient/tachograph.c
@@ -262,7 +262,7 @@ update(EventRecord *ev)
if (starttime == 0) {
if (ev->fcn == 0 ) {
if (debug)
- fprintf(stderr, "Skip %s input
%s\n",(ev->state>=0?statenames[ev->state]:"unknown"),ev->fcn);
+ fprintf(stderr, "Skip %s
input\n",(ev->state>=0?statenames[ev->state]:"unknown"));
return;
}
if (debug)
diff --git a/clients/mapiclient/tomograph.c b/clients/mapiclient/tomograph.c
--- a/clients/mapiclient/tomograph.c
+++ b/clients/mapiclient/tomograph.c
@@ -1440,7 +1440,7 @@ update(char *line, EventRecord *ev)
if (starttime == 0) {
if (ev->fcn == 0 ) {
if (debug)
- fprintf(stderr, "Skip %s input
%s\n",(ev->state>=0?statenames[ev->state]:"unknown"),ev->fcn);
+ fprintf(stderr, "Skip %s
input\n",(ev->state>=0?statenames[ev->state]:"unknown"));
return;
}
if (debug)
diff --git a/monetdb5/modules/mal/mdb.c b/monetdb5/modules/mal/mdb.c
--- a/monetdb5/modules/mal/mdb.c
+++ b/monetdb5/modules/mal/mdb.c
@@ -700,8 +700,7 @@ TBL_getdir(void)
BBPreclaim(b);
return NULL;
}
- strncpy(cur_dir, mod_path, l);
- cur_dir[l] = 0;
+ strncpy(cur_dir, mod_path, l + 1); /* including NULL
byte */
if ((mod_path = p) != NULL) {
while (*mod_path == PATH_SEP)
mod_path++;
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list