diff options
author | Sami Kerola | 2011-07-11 17:52:55 +0200 |
---|---|---|
committer | Sami Kerola | 2011-07-11 18:45:37 +0200 |
commit | 40c077a53d360dca1451634d37b36616ee109787 (patch) | |
tree | 37a8ef319613dc09e551f1dd46b09f791c220873 /disk-utils/fdformat.c | |
parent | fdformat: use long options (diff) | |
download | kernel-qcow2-util-linux-40c077a53d360dca1451634d37b36616ee109787.tar.gz kernel-qcow2-util-linux-40c077a53d360dca1451634d37b36616ee109787.tar.xz kernel-qcow2-util-linux-40c077a53d360dca1451634d37b36616ee109787.zip |
fdformat: integer comparisons & unused parameter
Fix compiler warnings about mismatching types and unused parameter.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'disk-utils/fdformat.c')
-rw-r--r-- | disk-utils/fdformat.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/disk-utils/fdformat.c b/disk-utils/fdformat.c index 41a1b8775..d525f5302 100644 --- a/disk-utils/fdformat.c +++ b/disk-utils/fdformat.c @@ -24,10 +24,10 @@ struct floppy_struct param; #define SECTOR_SIZE 512 -static void format_disk(int ctrl, char *name) +static void format_disk(int ctrl) { struct format_descr descr; - int track; + unsigned int track; printf(_("Formatting ... ")); fflush(stdout); @@ -56,7 +56,8 @@ static void format_disk(int ctrl, char *name) static void verify_disk(char *name) { unsigned char *data; - int fd,cyl_size,cyl,count; + unsigned int cyl; + int fd,cyl_size,count; cyl_size = param.sect*param.head*512; if ((data = (unsigned char *) malloc(cyl_size)) == NULL) @@ -160,7 +161,7 @@ int main(int argc,char **argv) printf(_("%s-sided, %d tracks, %d sec/track. Total capacity %d kB.\n"), (param.head == 2) ? _("Double") : _("Single"), param.track, param.sect,param.size >> 1); - format_disk(ctrl, argv[0]); + format_disk(ctrl); close(ctrl); if (verify) |