From: Karel Zak Date: Wed, 6 Jun 2012 08:48:26 +0000 (+0200) Subject: fdisk: fix compiler warnings [-Wsign-compare] X-Git-Tag: v2.22-rc1~300 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1fc87eacd58c6fce6e4ef6a5cef3be4315e8679;p=thirdparty%2Futil-linux.git fdisk: fix compiler warnings [-Wsign-compare] Signed-off-by: Karel Zak --- diff --git a/fdisk/fdisk.h b/fdisk/fdisk.h index f73d13afc4..d5d66d3cfc 100644 --- a/fdisk/fdisk.h +++ b/fdisk/fdisk.h @@ -224,14 +224,14 @@ static inline void seek_sector(struct fdisk_context *cxt, sector_t secno) static inline void read_sector(struct fdisk_context *cxt, sector_t secno, unsigned char *buf) { seek_sector(cxt, secno); - if (read(cxt->dev_fd, buf, cxt->sector_size) != cxt->sector_size) + if (read(cxt->dev_fd, buf, cxt->sector_size) != (ssize_t) cxt->sector_size) fatal(cxt, unable_to_read); } static inline void write_sector(struct fdisk_context *cxt, sector_t secno, unsigned char *buf) { seek_sector(cxt, secno); - if (write(cxt->dev_fd, buf, cxt->sector_size) != cxt->sector_size) + if (write(cxt->dev_fd, buf, cxt->sector_size) != (ssize_t) cxt->sector_size) fatal(cxt, unable_to_write); }