All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Whitney <enwlinux@gmail.com>
To: linux-ext4@vger.kernel.org
Cc: tytso@mit.edu
Subject: [PATCH] config: silence printf format warnings
Date: Fri, 4 Jan 2013 15:27:12 -0500	[thread overview]
Message-ID: <20130104202711.GA22365@wallace> (raw)


The printfs in the asm_types.c code contained within parse-types.sh
expect sizeof to return an int.  Fix this for architectures where
this isn't true (x86_64, etc.) so we don't see warning messages while
running the configure script.

Signed-off-by: Eric Whitney <enwlinux@gmail.com>
---
 config/parse-types.sh |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/config/parse-types.sh b/config/parse-types.sh
index d7cb9cc..c02d8cb 100755
--- a/config/parse-types.sh
+++ b/config/parse-types.sh
@@ -31,7 +31,7 @@ main(int argc, char **argv)
 #ifdef __U8_TYPEDEF
 	if (sizeof(__U8_TYPEDEF) != 1) {
 		printf("Sizeof(__U8__TYPEDEF) is %d should be 1\n", 
-		       sizeof(__U8_TYPEDEF));
+		       (int) sizeof(__U8_TYPEDEF));
 		exit(1);
 	}
 #else
@@ -40,7 +40,7 @@ main(int argc, char **argv)
 #ifdef __S8_TYPEDEF
 	if (sizeof(__S8_TYPEDEF) != 1) {
 		printf("Sizeof(_S8__TYPEDEF) is %d should be 1\n", 
-		       sizeof(__S8_TYPEDEF));
+		       (int) sizeof(__S8_TYPEDEF));
 		exit(1);
 	}
 #else
@@ -49,7 +49,7 @@ main(int argc, char **argv)
 #ifdef __U16_TYPEDEF
 	if (sizeof(__U16_TYPEDEF) != 2) {
 		printf("Sizeof(__U16__TYPEDEF) is %d should be 2\n", 
-		       sizeof(__U16_TYPEDEF));
+		       (int) sizeof(__U16_TYPEDEF));
 		exit(1);
 	}
 #else
@@ -58,7 +58,7 @@ main(int argc, char **argv)
 #ifdef __S16_TYPEDEF
 	if (sizeof(__S16_TYPEDEF) != 2) {
 		printf("Sizeof(__S16__TYPEDEF) is %d should be 2\n", 
-		       sizeof(__S16_TYPEDEF));
+		       (int) sizeof(__S16_TYPEDEF));
 		exit(1);
 	}
 #else
@@ -68,7 +68,7 @@ main(int argc, char **argv)
 #ifdef __U32_TYPEDEF
 	if (sizeof(__U32_TYPEDEF) != 4) {
 		printf("Sizeof(__U32__TYPEDEF) is %d should be 4\n", 
-		       sizeof(__U32_TYPEDEF));
+		       (int) sizeof(__U32_TYPEDEF));
 		exit(1);
 	}
 #else
@@ -77,7 +77,7 @@ main(int argc, char **argv)
 #ifdef __S32_TYPEDEF
 	if (sizeof(__S32_TYPEDEF) != 4) {
 		printf("Sizeof(__S32__TYPEDEF) is %d should be 4\n", 
-		       sizeof(__S32_TYPEDEF));
+		       (int) sizeof(__S32_TYPEDEF));
 		exit(1);
 	}
 #else
@@ -87,7 +87,7 @@ main(int argc, char **argv)
 #ifdef __U64_TYPEDEF
 	if (sizeof(__U64_TYPEDEF) != 8) {
 		printf("Sizeof(__U64__TYPEDEF) is %d should be 8\n", 
-		       sizeof(__U64_TYPEDEF));
+		       (int) sizeof(__U64_TYPEDEF));
 		exit(1);
 	}
 #else
@@ -96,7 +96,7 @@ main(int argc, char **argv)
 #ifdef __S64_TYPEDEF
 	if (sizeof(__S64_TYPEDEF) != 8) {
 		printf("Sizeof(__S64__TYPEDEF) is %d should be 8\n", 
-		       sizeof(__S64_TYPEDEF));
+		       (int) sizeof(__S64_TYPEDEF));
 		exit(1);
 	}
 #else
-- 
1.7.10.4


             reply	other threads:[~2013-01-04 20:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-04 20:27 Eric Whitney [this message]
2013-01-09  2:06 ` config: silence printf format warnings Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130104202711.GA22365@wallace \
    --to=enwlinux@gmail.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.