diff options
author | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-12-02 10:06:04 +0000 |
---|---|---|
committer | "Vladimir N. Oleynik" <dzo@simtreas.ru> | 2005-12-02 10:06:04 +0000 |
commit | a972c870a88c82a5b39eb5fd652729afe4f19679 (patch) | |
tree | ed454569dfa9fc59f258599604348f4d6d01379c | |
parent | 27d42a08c817c01fc49cbe1556ed6dbf13d9dc45 (diff) | |
download | busybox-w32-a972c870a88c82a5b39eb5fd652729afe4f19679.tar.gz busybox-w32-a972c870a88c82a5b39eb5fd652729afe4f19679.tar.bz2 busybox-w32-a972c870a88c82a5b39eb5fd652729afe4f19679.zip |
reduce signedness warning
-rw-r--r-- | util-linux/fdisk.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c index eb26abb59..eec82a6be 100644 --- a/util-linux/fdisk.c +++ b/util-linux/fdisk.c | |||
@@ -106,7 +106,7 @@ struct hd_geometry { | |||
106 | 106 | ||
107 | 107 | ||
108 | struct systypes { | 108 | struct systypes { |
109 | const unsigned char *name; | 109 | const char *name; |
110 | }; | 110 | }; |
111 | 111 | ||
112 | static uint sector_size = DEFAULT_SECTOR_SIZE, | 112 | static uint sector_size = DEFAULT_SECTOR_SIZE, |
@@ -122,7 +122,7 @@ static char MBRbuffer[MAX_SECTOR_SIZE]; | |||
122 | #else | 122 | #else |
123 | # define MBRbuffer bb_common_bufsiz1 | 123 | # define MBRbuffer bb_common_bufsiz1 |
124 | #endif | 124 | #endif |
125 | 125 | ||
126 | #ifdef CONFIG_FEATURE_SUN_LABEL | 126 | #ifdef CONFIG_FEATURE_SUN_LABEL |
127 | static int sun_label; /* looking at sun disklabel */ | 127 | static int sun_label; /* looking at sun disklabel */ |
128 | #else | 128 | #else |
@@ -309,7 +309,8 @@ str_units(int n) { /* n==1: use singular */ | |||
309 | } | 309 | } |
310 | 310 | ||
311 | static int | 311 | static int |
312 | valid_part_table_flag(const unsigned char *b) { | 312 | valid_part_table_flag(const char *mbuffer) { |
313 | const unsigned char *b = (const unsigned char *)mbuffer; | ||
313 | return (b[510] == 0x55 && b[511] == 0xaa); | 314 | return (b[510] == 0x55 && b[511] == 0xaa); |
314 | } | 315 | } |
315 | 316 | ||
@@ -2777,7 +2778,7 @@ static void create_sunlabel(void) | |||
2777 | puts(_("You may change all the disk params from the x menu")); | 2778 | puts(_("You may change all the disk params from the x menu")); |
2778 | } | 2779 | } |
2779 | 2780 | ||
2780 | snprintf(sunlabel->info, sizeof(sunlabel->info), | 2781 | snprintf((char *)(sunlabel->info), sizeof(sunlabel->info), |
2781 | "%s%s%s cyl %d alt %d hd %d sec %d", | 2782 | "%s%s%s cyl %d alt %d hd %d sec %d", |
2782 | p ? p->vendor : "", (p && *p->vendor) ? " " : "", | 2783 | p ? p->vendor : "", (p && *p->vendor) ? " " : "", |
2783 | p ? p->model | 2784 | p ? p->model |
@@ -3630,7 +3631,7 @@ static const char *partition_type(unsigned char type) | |||
3630 | const struct systypes *types = get_sys_types(); | 3631 | const struct systypes *types = get_sys_types(); |
3631 | 3632 | ||
3632 | for (i=0; types[i].name; i++) | 3633 | for (i=0; types[i].name; i++) |
3633 | if (types[i].name[0] == type) | 3634 | if ((unsigned char )types[i].name[0] == type) |
3634 | return types[i].name + 1; | 3635 | return types[i].name + 1; |
3635 | 3636 | ||
3636 | return _("Unknown"); | 3637 | return _("Unknown"); |
@@ -3664,7 +3665,8 @@ void list_types(const struct systypes *sys) | |||
3664 | 3665 | ||
3665 | do { | 3666 | do { |
3666 | printf("%c%2x %-15.15s", i ? ' ' : '\n', | 3667 | printf("%c%2x %-15.15s", i ? ' ' : '\n', |
3667 | sys[next].name[0], partition_type(sys[next].name[0])); | 3668 | (unsigned char)sys[next].name[0], |
3669 | partition_type((unsigned char)sys[next].name[0])); | ||
3668 | next = last[i++] + done; | 3670 | next = last[i++] + done; |
3669 | if (i > 3 || next >= last[i]) { | 3671 | if (i > 3 || next >= last[i]) { |
3670 | i = 0; | 3672 | i = 0; |
@@ -3932,7 +3934,7 @@ get_kernel_geometry(void) { | |||
3932 | 3934 | ||
3933 | static void | 3935 | static void |
3934 | get_partition_table_geometry(void) { | 3936 | get_partition_table_geometry(void) { |
3935 | const unsigned char *bufp = MBRbuffer; | 3937 | const unsigned char *bufp = (const unsigned char *)MBRbuffer; |
3936 | struct partition *p; | 3938 | struct partition *p; |
3937 | int i, h, s, hh, ss; | 3939 | int i, h, s, hh, ss; |
3938 | int first = 1; | 3940 | int first = 1; |