All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv1 1/5] mkfs.jffs2: fix casting of printf argument
@ 2011-04-13 13:20 Andy Shevchenko
  2011-04-13 13:20 ` [PATCHv1 2/5] serve_image: adjust type for printf Andy Shevchenko
                   ` (4 more replies)
  0 siblings, 5 replies; 44+ messages in thread
From: Andy Shevchenko @ 2011-04-13 13:20 UTC (permalink / raw)
  To: Artem Bityutskiy, linux-mtd; +Cc: Andy Shevchenko

The compiler warns us about cast mismatch for %9lu specifier.  In original code
the argument has __off64_t type. Here is a simple type casting fix.

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
---
 mkfs.jffs2.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/mkfs.jffs2.c b/mkfs.jffs2.c
index 3aab533..7bb9ad1 100644
--- a/mkfs.jffs2.c
+++ b/mkfs.jffs2.c
@@ -1233,7 +1233,7 @@ static void recursive_populate_directory(struct filesystem_entry *dir)
 			case S_IFDIR:
 				if (verbose) {
 					printf("\td %04o %9lu             %5d:%-3d %s\n",
-							e->sb.st_mode & ~S_IFMT, e->sb.st_size,
+							e->sb.st_mode & ~S_IFMT, (unsigned long) e->sb.st_size,
 							(int) (e->sb.st_uid), (int) (e->sb.st_gid),
 							e->name);
 				}
@@ -1243,7 +1243,7 @@ static void recursive_populate_directory(struct filesystem_entry *dir)
 			case S_IFSOCK:
 				if (verbose) {
 					printf("\ts %04o %9lu             %5d:%-3d %s\n",
-							e->sb.st_mode & ~S_IFMT, e->sb.st_size,
+							e->sb.st_mode & ~S_IFMT, (unsigned long) e->sb.st_size,
 							(int) e->sb.st_uid, (int) e->sb.st_gid, e->name);
 				}
 				write_pipe(e);
@@ -1252,7 +1252,7 @@ static void recursive_populate_directory(struct filesystem_entry *dir)
 			case S_IFIFO:
 				if (verbose) {
 					printf("\tp %04o %9lu             %5d:%-3d %s\n",
-							e->sb.st_mode & ~S_IFMT, e->sb.st_size,
+							e->sb.st_mode & ~S_IFMT, (unsigned long) e->sb.st_size,
 							(int) e->sb.st_uid, (int) e->sb.st_gid, e->name);
 				}
 				write_pipe(e);
@@ -1281,7 +1281,7 @@ static void recursive_populate_directory(struct filesystem_entry *dir)
 			case S_IFLNK:
 				if (verbose) {
 					printf("\tl %04o %9lu             %5d:%-3d %s -> %s\n",
-							e->sb.st_mode & ~S_IFMT, e->sb.st_size,
+							e->sb.st_mode & ~S_IFMT, (unsigned long) e->sb.st_size,
 							(int) e->sb.st_uid, (int) e->sb.st_gid, e->name,
 							e->link);
 				}
@@ -1293,8 +1293,8 @@ static void recursive_populate_directory(struct filesystem_entry *dir)
 				write_xattr_entry(e);
 				if (verbose) {
 					printf("\tf %04o %9lu (%9u) %5d:%-3d %s\n",
-							e->sb.st_mode & ~S_IFMT, e->sb.st_size, wrote,
-							(int) e->sb.st_uid, (int) e->sb.st_gid, e->name);
+							e->sb.st_mode & ~S_IFMT, (unsigned long) e->sb.st_size,
+							wrote, (int) e->sb.st_uid, (int) e->sb.st_gid, e->name);
 				}
 				break;
 			default:
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 44+ messages in thread

end of thread, other threads:[~2011-04-22  7:41 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-13 13:20 [PATCHv1 1/5] mkfs.jffs2: fix casting of printf argument Andy Shevchenko
2011-04-13 13:20 ` [PATCHv1 2/5] serve_image: adjust type for printf Andy Shevchenko
2011-04-14 12:25   ` Artem Bityutskiy
2011-04-13 13:20 ` [PATCHv1 3/5] tests: fs-tests: read() returns ssize_t value Andy Shevchenko
2011-04-14 12:26   ` Artem Bityutskiy
2011-04-13 13:20 ` [PATCHv1 4/5] tests: checkfs: adjust Makefile Andy Shevchenko
2011-04-14 12:28   ` Artem Bityutskiy
2011-04-13 13:20 ` [PATCHv1 5/5] tests: ubi-tests: clean libubi.a and *.o Andy Shevchenko
2011-04-14 12:30   ` Artem Bityutskiy
2011-04-14 12:24 ` [PATCHv1 1/5] mkfs.jffs2: fix casting of printf argument Artem Bityutskiy
2011-04-14 13:21   ` Andy Shevchenko
2011-04-18  8:31   ` [PATCHv2 1/2] serve_image: adjust classificator and type for printf Andy Shevchenko
2011-04-18  8:31     ` [PATCHv2 2/2] mkfs.jffs2: fix casting of __off64_t Andy Shevchenko
2011-04-18 13:49       ` Mike Frysinger
2011-04-18 13:55         ` Artem Bityutskiy
2011-04-18 14:04           ` Mike Frysinger
2011-04-18 14:07             ` Artem Bityutskiy
2011-04-18 14:21               ` Mike Frysinger
2011-04-18 14:29                 ` Artem Bityutskiy
2011-04-18 14:26               ` Andy Shevchenko
2011-04-18 14:29                 ` Mike Frysinger
2011-04-18 14:50                   ` Andy Shevchenko
2011-04-18 14:57                     ` Mike Frysinger
2011-04-18 15:20                       ` Andy Shevchenko
2011-04-18 21:33                         ` Mike Frysinger
2011-04-19  6:43                           ` Artem Bityutskiy
2011-04-19  8:34                             ` [PATCHv3 1/3] " Andy Shevchenko
2011-04-19  8:34                               ` [PATCHv3 2/3] libmtd: use PRIu64 classifier for uint64_t printf arguments Andy Shevchenko
2011-04-19  8:34                               ` [PATCHv3 3/3] serve_image: adjust classifier and type for printf Andy Shevchenko
2011-04-19 14:26                                 ` Mike Frysinger
2011-04-19 14:32                                   ` Andy Shevchenko
2011-04-19 21:54                                     ` Mike Frysinger
2011-04-20  9:35                                       ` [PATCHv4 1/3] mkfs.jffs2: fix casting of __off64_t Andy Shevchenko
2011-04-20  9:35                                         ` [PATCHv4 2/3] libmtd: use PRIu64 classifier for uint64_t printf arguments Andy Shevchenko
2011-04-20  9:35                                         ` [PATCHv4 3/3] serve_image: adjust classifier and type for printf Andy Shevchenko
2011-04-20 19:04                                         ` [PATCHv4 1/3] mkfs.jffs2: fix casting of __off64_t Mike Frysinger
2011-04-21 12:53                                         ` Artem Bityutskiy
2011-04-21 17:09                                 ` [PATCH] serve_image: missing comma Brian Norris
2011-04-22  7:38                                   ` Artem Bityutskiy
2011-04-19 14:26                               ` [PATCHv3 1/3] mkfs.jffs2: fix casting of __off64_t Mike Frysinger
2011-04-19 14:29                                 ` Andy Shevchenko
2011-04-19 14:38                                   ` Mike Frysinger
2011-04-19 14:42                                     ` Andy Shevchenko
2011-04-18 13:50     ` [PATCHv2 1/2] serve_image: adjust classificator and type for printf Mike Frysinger

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.