From: Karel Zak Date: Wed, 6 Jun 2012 08:53:20 +0000 (+0200) Subject: fdisk: fix compiler warning [-Wpointer-sign] X-Git-Tag: v2.22-rc1~299 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c04e4a6a20b863147a4eceef3443df8672319ac5;p=thirdparty%2Futil-linux.git fdisk: fix compiler warning [-Wpointer-sign] Signed-off-by: Karel Zak --- diff --git a/fdisk/utils.c b/fdisk/utils.c index 94b8bd84ef..4d838412c8 100644 --- a/fdisk/utils.c +++ b/fdisk/utils.c @@ -33,7 +33,7 @@ int fdisk_debug_mask; static unsigned long __get_sector_size(int fd) { - unsigned int sect_sz; + int sect_sz; if (!blkdev_get_sector_size(fd, §_sz)) return (unsigned long) sect_sz; @@ -74,8 +74,10 @@ static int __discover_topology(struct fdisk_context *cxt) #endif /* no blkid or error, use default values */ - if (!cxt->min_io_size) cxt->min_io_size = DEFAULT_SECTOR_SIZE; - if (!cxt->io_size) cxt->io_size = DEFAULT_SECTOR_SIZE; + if (!cxt->min_io_size) + cxt->min_io_size = DEFAULT_SECTOR_SIZE; + if (!cxt->io_size) + cxt->io_size = DEFAULT_SECTOR_SIZE; cxt->sector_size = __get_sector_size(cxt->dev_fd); if (!cxt->phy_sector_size) /* could not discover physical size */