From 46151e8772563f0dffe3901575dd8999f9c2fd43 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 2 Jul 2007 15:39:58 +0200 Subject: [PATCH] sfdisk: fix "differ in signedness" compiler warnings Signed-off-by: Karel Zak --- fdisk/cfdisk.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c index 40b23460..1117f454 100644 --- a/fdisk/cfdisk.c +++ b/fdisk/cfdisk.c @@ -547,7 +547,7 @@ die_x(int ret) { } static void -read_sector(char *buffer, long long sect_num) { +read_sector(unsigned char *buffer, long long sect_num) { if (lseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0) fatal(_("Cannot seek on disk drive"), 2); if (read(fd, buffer, SECTOR_SIZE) != SECTOR_SIZE) @@ -555,7 +555,7 @@ read_sector(char *buffer, long long sect_num) { } static void -write_sector(char *buffer, long long sect_num) { +write_sector(unsigned char *buffer, long long sect_num) { if (lseek(fd, sect_num*SECTOR_SIZE, SEEK_SET) < 0) fatal(_("Cannot seek on disk drive"), 2); if (write(fd, buffer, SECTOR_SIZE) != SECTOR_SIZE) @@ -686,8 +686,8 @@ get_linux_label(int i) { offset = (p_info[i].first_sector + p_info[i].offset) * SECTOR_SIZE + 0; if (lseek(fd, offset, SEEK_SET) == offset && read(fd, &xfsb, sizeof(xfsb)) == sizeof(xfsb) - && !strncmp(xfsb.s_magic, XFS_SUPER_MAGIC, 4)) { - label = xfsb.s_fname; + && !strncmp((char *) xfsb.s_magic, XFS_SUPER_MAGIC, 4)) { + label = (char *) xfsb.s_fname; for(j=0; j