[m-rev.] trivial diff: avoid a warning from gcc on saturn

Julien Fischer juliensf at csse.unimelb.edu.au
Wed Jan 10 18:55:20 AEDT 2007


Estimated hours taken: 0
Branches: main

Avoid a warning from gcc on saturn.

trace/mercury_trace_tables.c:
 	The MR_functor_type_arity field of MR_FunctorTypeCtor structure
 	has type int, rather than MR_Integer.  Applying
 	MR_INTEGER_LENGTH_MODIFIER to the %d conversion specifier in
 	printf control strings will cause gcc to emit a warning on
 	systems where sizeof(int) != sizeof(MR_Integer).

Julien.

Index: mercury_trace_tables.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/trace/mercury_trace_tables.c,v
retrieving revision 1.47
diff -u -r1.47 mercury_trace_tables.c
--- mercury_trace_tables.c	14 Dec 2006 04:36:04 -0000	1.47
+++ mercury_trace_tables.c	10 Jan 2007 07:50:52 -0000
@@ -1033,7 +1033,7 @@
                      fprintf(fp, "%s/%d ",
                          functors[i].MR_functor_name,
                          functors[i].MR_functor_arity);
-                    fprintf(fp, "%s.%s/%" MR_INTEGER_LENGTH_MODIFIER "d\n",
+                    fprintf(fp, "%s.%s/%d\n",
                          functors[i].MR_functor_type_module,
                          functors[i].MR_functor_type_name,
                          functors[i].MR_functor_type_arity);

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list