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

Julien Fischer juliensf at csse.unimelb.edu.au
Thu May 3 17:16:21 AEST 2007


Estimated hours taken: 0
Branches: main

runtime/mercury_bitmap.c:
 	Avoid a warning from gcc on 64-bit machines.

Julien.

Index: mercury_bitmap.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_bitmap.c,v
retrieving revision 1.2
diff -u -r1.2 mercury_bitmap.c
--- mercury_bitmap.c	14 Feb 2007 02:16:08 -0000	1.2
+++ mercury_bitmap.c	3 May 2007 07:14:14 -0000
@@ -92,7 +92,7 @@
      int start;
      char num_bits_str[100];

-    sprintf(num_bits_str, "%d", b->num_bits);
+    sprintf(num_bits_str, "%" MR_INTEGER_LENGTH_MODIFIER "d", b->num_bits);
      num_bits_len = strlen(num_bits_str);
      num_bytes = MR_bitmap_length_in_bytes(b->num_bits);
      len = 1 + num_bits_len + 1 + num_bytes * 2 + 1;

--------------------------------------------------------------------------
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