From c04e4a6a20b863147a4eceef3443df8672319ac5 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 6 Jun 2012 10:53:20 +0200 Subject: [PATCH] fdisk: fix compiler warning [-Wpointer-sign] Signed-off-by: Karel Zak --- fdisk/utils.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 */ -- 2.47.3