diff options
author | Joel E. Denny <jdenny@clemson.edu> | 2009-09-29 06:54:38 -0400 |
---|---|---|
committer | Joel E. Denny <jdenny@clemson.edu> | 2009-09-29 07:04:29 -0400 |
commit | 47eced3099712180364f4e01b839242027d9a9d8 (patch) | |
tree | 931c0cf85f84da0b0e71ddbf7073f4cd8ac391dc /src/Sbitset.c | |
parent | d8f68fc29536fa1c1e7b1b200b1e8088762c3e93 (diff) | |
download | bison-47eced3099712180364f4e01b839242027d9a9d8.tar.gz |
Use the correct conversion specifier for size_t.
Reported by Jim Meyering.
* src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
because Sbitset__Index is size_t.
* src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
Diffstat (limited to 'src/Sbitset.c')
-rw-r--r-- | src/Sbitset.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Sbitset.c b/src/Sbitset.c index 0c1fedfc..af8600bd 100644 --- a/src/Sbitset.c +++ b/src/Sbitset.c @@ -65,14 +65,16 @@ Sbitset__fprint(Sbitset self, Sbitset__Index nbits, FILE *file) Sbitset__Index i; Sbitset itr; bool first = true; - fprintf (file, "nbits = %d, set = {", nbits); + fprintf (file, + "nbits = %" SBITSET__INDEX__CONVERSION_SPEC ", set = {", + nbits); SBITSET__FOR_EACH (self, nbits, itr, i) { if (first) first = false; else fprintf (file, ","); - fprintf (file, " %d", i); + fprintf (file, " %" SBITSET__INDEX__CONVERSION_SPEC, i); } fprintf (file, " }"); } |