aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--array.c2
-rw-r--r--mpfr.c2
-rw-r--r--node.c2
4 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 990b4b74..1e761e38 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-07-01 Arnold D. Robbins <arnold@skeeve.com>
+
+ * array.c (value_info): Print something reasonable when stfmt
+ is -1.
+ * mpfr.c (mpg_format_val): Don't cast index to char.
+ * node.c (r_format_val): Ditto.
+ Thanks to Andrew Schorr for pointing these out.
+
2016-06-26 Arnold D. Robbins <arnold@skeeve.com>
Repair change of 2015-08-25 to handling of MAYBE_NUM.
diff --git a/array.c b/array.c
index 85570e88..8c9cc72e 100644
--- a/array.c
+++ b/array.c
@@ -704,7 +704,7 @@ value_info(NODE *n)
if ((n->flags & (STRING|STRCUR)) == STRCUR) {
fprintf(output_fp, "][");
fprintf(output_fp, "stfmt=%d, ", n->stfmt);
- fprintf(output_fp, "CONVFMT=\"%s\"", n->stfmt <= -1 ? "%ld"
+ fprintf(output_fp, "CONVFMT=\"%s\"", n->stfmt <= -1 ? "<unused>"
: fmt_list[n->stfmt]->stptr);
}
diff --git a/mpfr.c b/mpfr.c
index 533ec9d9..9b9e538e 100644
--- a/mpfr.c
+++ b/mpfr.c
@@ -377,7 +377,7 @@ mpg_format_val(const char *format, int index, NODE *s)
} else {
r = format_tree(format, fmt_list[index]->stlen, dummy, 2);
assert(r != NULL);
- s->stfmt = (char) index;
+ s->stfmt = index;
}
s->flags = oflags;
s->stlen = r->stlen;
diff --git a/node.c b/node.c
index 41545752..24f1493c 100644
--- a/node.c
+++ b/node.c
@@ -246,7 +246,7 @@ r_format_val(const char *format, int index, NODE *s)
} else {
r = format_tree(format, fmt_list[index]->stlen, dummy, 2);
assert(r != NULL);
- s->stfmt = (char) index;
+ s->stfmt = index;
}
s->flags = oflags;
s->stlen = r->stlen;