842a7c190674e90f2da59bc997ee3fd3a9557af8
[openwrt/staging/yousong.git] / tools / dosfstools / patches / 0003-mkfs.fat.c-Use-unsigned-char-for-binary-data.patch
1 From 8b8948c06de55455b63dc11f765d7ee39f30c4e0 Mon Sep 17 00:00:00 2001
2 From: Andreas Bombe <aeb@debian.org>
3 Date: Mon, 29 Dec 2014 18:24:54 +0100
4 Subject: [PATCH 03/14] mkfs.fat.c: Use unsigned char for binary data
5
6 Simple char technically works for the dummy_boot_jump variables, but
7 some compiler warning settings would give a warning over a signed char
8 overflowing with the values given as initializers.
9
10 Signed-off-by: Andreas Bombe <aeb@debian.org>
11 ---
12 src/mkfs.fat.c | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15 diff --git a/src/mkfs.fat.c b/src/mkfs.fat.c
16 index 604b7d0..1f702ad 100644
17 --- a/src/mkfs.fat.c
18 +++ b/src/mkfs.fat.c
19 @@ -219,9 +219,9 @@ struct msdos_dir_entry {
20 /* The "boot code" we put into the filesystem... it writes a message and
21 tells the user to try again */
22
23 -char dummy_boot_jump[3] = { 0xeb, 0x3c, 0x90 };
24 +unsigned char dummy_boot_jump[3] = { 0xeb, 0x3c, 0x90 };
25
26 -char dummy_boot_jump_m68k[2] = { 0x60, 0x1c };
27 +unsigned char dummy_boot_jump_m68k[2] = { 0x60, 0x1c };
28
29 #define MSG_OFFSET_OFFSET 3
30 char dummy_boot_code[BOOTCODE_SIZE] = "\x0e" /* push cs */
31 --
32 1.9.1
33