[m-dev.] trivial diff: MR_print_r_regs: fix printf("%d", MR_Word)
Fergus Henderson
fjh at cs.mu.OZ.AU
Mon Dec 11 07:58:42 AEDT 2000
Estimated hours taken: 0.25
trace/mercury_trace_util.c:
Fix a gcc warning about passing argument types to printf()
that don't match the printf() format specification.
Workspace: /home/pgrad/fjh/ws/hg
Index: trace/mercury_trace_util.c
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/mercury_trace_util.c,v
retrieving revision 1.4
diff -u -d -r1.4 mercury_trace_util.c
--- trace/mercury_trace_util.c 2000/11/23 02:01:10 1.4
+++ trace/mercury_trace_util.c 2000/12/10 20:55:50
@@ -79,14 +79,19 @@
void
MR_print_r_regs(FILE *fp, MR_Word *saved_regs)
{
- fprintf(fp, "r1 = %d (%x)\n",
- MR_saved_reg(saved_regs, 1), MR_saved_reg(saved_regs, 1));
- fprintf(fp, "r2 = %d (%x)\n",
- MR_saved_reg(saved_regs, 2), MR_saved_reg(saved_regs, 2));
- fprintf(fp, "r3 = %d (%x)\n",
- MR_saved_reg(saved_regs, 3), MR_saved_reg(saved_regs, 3));
- fprintf(fp, "r4 = %d (%x)\n",
- MR_saved_reg(saved_regs, 4), MR_saved_reg(saved_regs, 4));
- fprintf(fp, "r5 = %d (%x)\n",
- MR_saved_reg(saved_regs, 5), MR_saved_reg(saved_regs, 5));
+ fprintf(fp, "r1 = %ld (%lx)\n",
+ (long) MR_saved_reg(saved_regs, 1),
+ (long) MR_saved_reg(saved_regs, 1));
+ fprintf(fp, "r2 = %ld (%lx)\n",
+ (long) MR_saved_reg(saved_regs, 2),
+ (long) MR_saved_reg(saved_regs, 2));
+ fprintf(fp, "r3 = %ld (%lx)\n",
+ (long) MR_saved_reg(saved_regs, 3),
+ (long) MR_saved_reg(saved_regs, 3));
+ fprintf(fp, "r4 = %ld (%lx)\n",
+ (long) MR_saved_reg(saved_regs, 4),
+ (long) MR_saved_reg(saved_regs, 4));
+ fprintf(fp, "r5 = %ld (%lx)\n",
+ (long) MR_saved_reg(saved_regs, 5),
+ (long) MR_saved_reg(saved_regs, 5));
}
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list