[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: avoid -Wformat warning about %d with size_t argument
From: |
Jim Meyering |
Subject: |
[PATCH] tests: avoid -Wformat warning about %d with size_t argument |
Date: |
Wed, 31 Mar 2010 11:49:35 +0200 |
FYI,
Otherwise,
get-mb-cur-max.c: In function 'main':
get-mb-cur-max.c:32: error: format '%d' expects type 'int', but argument 2
has type 'size_t' [-Wformat]
>From ef2c4834b72873da314c88dd76a00179e4523844 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 31 Mar 2010 11:48:50 +0200
Subject: [PATCH] tests: avoid -Wformat warning about %d with size_t argument
* tests/get-mb-cur-max.c (main): Cast MB_CUR_MAX to unsigned int.
---
tests/get-mb-cur-max.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/tests/get-mb-cur-max.c b/tests/get-mb-cur-max.c
index 3ba7389..f5d923a 100644
--- a/tests/get-mb-cur-max.c
+++ b/tests/get-mb-cur-max.c
@@ -29,7 +29,7 @@ main (int argc, char **argv)
set_program_name (argv[0]);
if (setlocale (LC_ALL, argv[1]))
{
- printf ("%d\n", MB_CUR_MAX);
+ printf ("%u\n", (unsigned int) MB_CUR_MAX);
exit (EXIT_SUCCESS);
}
--
1.7.0.3.513.gc8ed0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] tests: avoid -Wformat warning about %d with size_t argument,
Jim Meyering <=