[PATCH 5/6] sfdisk: fix implicit overflow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sfdisk.c:1650:6: warning: overflow in implicit constant conversion [-Woverflow]

Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 fdisk/sfdisk.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fdisk/sfdisk.c b/fdisk/sfdisk.c
index d4dbcca..afecb93 100644
--- a/fdisk/sfdisk.c
+++ b/fdisk/sfdisk.c
@@ -1647,7 +1647,7 @@ write_partitions(char *dev, int fd, struct disk_desc *z) {
 	if (p->ptype == DOS_TYPE) {
 	    copy_from_part(&(p->p), s->data + p->offset);
 	    s->data[510] = 0x55;
-	    s->data[511] = 0xaa;
+	    s->data[511] = (unsigned char) 0xaa;
 	}
     }
     if (save_sector_file) {
-- 
1.7.5.2

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux