[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] build: avoid printf format mismatch warnings
From: |
Eric Blake |
Subject: |
Re: [PATCH] build: avoid printf format mismatch warnings |
Date: |
Tue, 29 Sep 2009 14:30:18 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Joel E. Denny <jdenny <at> clemson.edu> writes:
> Because Sbitset__index is a size_t, wouldn't the following patch be
> better?
>
> - fprintf (file, "nbits = %d, set = {", nbits);
> + fprintf (file,
> + "nbits = %" SBITSET__INDEX__CONVERSION_SPEC ", set = {",
> + nbits);
>
> typedef char *Sbitset;
> typedef size_t Sbitset__Index;
> +#define SBITSET__INDEX__CONVERSION_SPEC "zu"
For this to work on all platforms, you need the gnulib module fprintf-posix
(sadly, %zu is not completely portable yet).
--
Eric Blake
- Re: [PATCH] build: avoid printf format mismatch warnings, (continued)
- Re: [PATCH] build: avoid printf format mismatch warnings, Joel E. Denny, 2009/09/29
- Re: [PATCH] build: avoid printf format mismatch warnings, Jim Meyering, 2009/09/29
- Re: [PATCH] build: avoid printf format mismatch warnings, Joel E. Denny, 2009/09/29
- Re: [PATCH] build: avoid printf format mismatch warnings, Joel E. Denny, 2009/09/29
- Re: [PATCH] build: avoid printf format mismatch warnings, Jim Meyering, 2009/09/29
- Re: [PATCH] build: avoid printf format mismatch warnings, Joel E. Denny, 2009/09/29
- Re: [PATCH] build: avoid printf format mismatch warnings, Jim Meyering, 2009/09/29
- Re: [PATCH] build: avoid printf format mismatch warnings, Nicolas Joly, 2009/09/29
- Re: [PATCH] build: avoid printf format mismatch warnings, Jim Meyering, 2009/09/29
- Re: [PATCH] build: avoid printf format mismatch warnings, Joel E. Denny, 2009/09/29
Re: [PATCH] build: avoid printf format mismatch warnings,
Eric Blake <=