summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-07-10 11:11:32 +0300
committerArnold D. Robbins <arnold@skeeve.com>2020-07-10 11:11:32 +0300
commit148e858362060f90f05af79189550fe2e0e42f31 (patch)
tree56e0d2c5a41a8c46792b5b319f3dd1d9254aa02c
parent244853b8443ecba49e84f2f527ceb386b8628e9a (diff)
downloadgawk-148e858362060f90f05af79189550fe2e0e42f31.tar.gz
Fix some printf formatting issues.
-rw-r--r--ChangeLog8
-rw-r--r--cint_array.c4
-rw-r--r--debug.c2
-rw-r--r--mpfr.c4
4 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 94511c8c..74c81252 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2020-07-10 Arnold D. Robbins <arnold@skeeve.com>
+
+ Fix printf issues. Thanks to Michal Jaegermann for the report.
+
+ * cint_array.c (cint_dump): Fix printf formats.
+ * debug.c (print_symbol): Ditto.
+ * mpfr.c (mpg_interpret): Ditto.
+
2020-07-09 Arnold D. Robbins <arnold@skeeve.com>
Fix dbugeval2 test for MPFR.
diff --git a/cint_array.c b/cint_array.c
index dd35ac84..b77b0014 100644
--- a/cint_array.c
+++ b/cint_array.c
@@ -527,8 +527,8 @@ cint_dump(NODE *symbol, NODE *ndump)
indent(indent_level);
fprintf(output_fp, "THRESHOLD: %ld\n", THRESHOLD);
indent(indent_level);
- fprintf(output_fp, "table_size: %ld (total), %ld (cint), %ld (int + str)\n",
- symbol->table_size, cint_size, xsize);
+ fprintf(output_fp, "table_size: %lu (total), %ld (cint), %ld (int + str)\n",
+ (unsigned long) symbol->table_size, cint_size, xsize);
indent(indent_level);
fprintf(output_fp, "array_capacity: %lu\n", (unsigned long) symbol->array_capacity);
indent(indent_level);
diff --git a/debug.c b/debug.c
index 4ca93735..68740d6d 100644
--- a/debug.c
+++ b/debug.c
@@ -964,7 +964,7 @@ print_symbol(NODE *r, bool isparam)
valinfo(r->var_value, fprintf, out_fp);
break;
case Node_var_array:
- fprintf(out_fp, "array, %ld elements\n", assoc_length(r));
+ fprintf(out_fp, "array, %ld elements\n", (long) assoc_length(r));
break;
case Node_func:
fprintf(out_fp, "`function'\n");
diff --git a/mpfr.c b/mpfr.c
index 3ffcba17..6959e4cd 100644
--- a/mpfr.c
+++ b/mpfr.c
@@ -1757,7 +1757,7 @@ mod:
default:
if (do_itrace) {
- fprintf(stderr, "unhandled\n", opcode2str(op));
+ fprintf(stderr, "unhandled\n");
fflush(stderr);
}
return true; /* unhandled */
@@ -1765,7 +1765,7 @@ mod:
*cp = pc->nexti; /* next instruction to execute */
if (do_itrace) {
- fprintf(stderr, "handled\n", opcode2str(op));
+ fprintf(stderr, "handled\n");
fflush(stderr);
}
return false;