diff options
author | Sami Kerola | 2011-02-20 00:00:40 +0100 |
---|---|---|
committer | Karel Zak | 2011-02-21 16:12:49 +0100 |
commit | 4c60c667c4b12c540c445649c725a1e184fb1b9c (patch) | |
tree | af4b5a7d7509fe5c488f425a4ac1cb5d1142957f /disk-utils/mkswap.c | |
parent | mkswap: use EXIT_ values (diff) | |
download | kernel-qcow2-util-linux-4c60c667c4b12c540c445649c725a1e184fb1b9c.tar.gz kernel-qcow2-util-linux-4c60c667c4b12c540c445649c725a1e184fb1b9c.tar.xz kernel-qcow2-util-linux-4c60c667c4b12c540c445649c725a1e184fb1b9c.zip |
mkswap: fix to compiler warnings
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'disk-utils/mkswap.c')
-rw-r--r-- | disk-utils/mkswap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/disk-utils/mkswap.c b/disk-utils/mkswap.c index 4a171dba7..96468dbf1 100644 --- a/disk-utils/mkswap.c +++ b/disk-utils/mkswap.c @@ -144,7 +144,7 @@ is_sparc64(void) { * What to do? Let us allow the user to specify the pagesize explicitly. * */ -static int user_pagesize; +static long user_pagesize; static int pagesize; static unsigned long *signature_page = NULL; @@ -155,9 +155,9 @@ init_signature_page(void) { if (user_pagesize) { if ((user_pagesize & (user_pagesize-1)) || - user_pagesize < sizeof(struct swap_header_v1_2) + 10) + user_pagesize < (long) sizeof(struct swap_header_v1_2) + 10) errx(EXIT_FAILURE, - _("Bad user-specified page size %d"), + _("Bad user-specified page size %lu"), user_pagesize); pagesize = user_pagesize; } @@ -439,7 +439,7 @@ main(int argc, char ** argv) { unsigned long long sz; off_t offset; int force = 0; - int version = 1; + long version = 1; char *block_count = 0; char *opt_label = NULL; unsigned char *uuid = NULL; @@ -509,7 +509,7 @@ main(int argc, char ** argv) { if (version != 1) { errx(EXIT_FAILURE, - _("does not support swapspace version %d."), + _("does not support swapspace version %lu."), version); } |