From e1fc87eacd58c6fce6e4ef6a5cef3be4315e8679 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 6 Jun 2012 10:48:26 +0200 Subject: [PATCH] fdisk: fix compiler warnings [-Wsign-compare] Signed-off-by: Karel Zak --- fdisk/fdisk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fdisk/fdisk.h b/fdisk/fdisk.h index f73d13afc..d5d66d3cf 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); }