]> www.infradead.org Git - mtd-utils.git/commitdiff
mkfs.jffs2: fix casting of printf argument
authorAndy Shevchenko <ext-andriy.shevchenko@nokia.com>
Wed, 13 Apr 2011 13:20:25 +0000 (16:20 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 14 Apr 2011 12:28:44 +0000 (15:28 +0300)
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>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
mkfs.jffs2.c

index 3aab53378493898a2b8dcb30cdf7b464aef4d35c..7bb9ad155bf362d76720c92744bfa79ee99fb46b 100644 (file)
@@ -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: