mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
reduce signedness warning
This commit is contained in:
parent
27d42a08c8
commit
a972c870a8
@ -106,7 +106,7 @@ struct hd_geometry {
|
|||||||
|
|
||||||
|
|
||||||
struct systypes {
|
struct systypes {
|
||||||
const unsigned char *name;
|
const char *name;
|
||||||
};
|
};
|
||||||
|
|
||||||
static uint sector_size = DEFAULT_SECTOR_SIZE,
|
static uint sector_size = DEFAULT_SECTOR_SIZE,
|
||||||
@ -122,7 +122,7 @@ static char MBRbuffer[MAX_SECTOR_SIZE];
|
|||||||
#else
|
#else
|
||||||
# define MBRbuffer bb_common_bufsiz1
|
# define MBRbuffer bb_common_bufsiz1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_FEATURE_SUN_LABEL
|
#ifdef CONFIG_FEATURE_SUN_LABEL
|
||||||
static int sun_label; /* looking at sun disklabel */
|
static int sun_label; /* looking at sun disklabel */
|
||||||
#else
|
#else
|
||||||
@ -309,7 +309,8 @@ str_units(int n) { /* n==1: use singular */
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
valid_part_table_flag(const unsigned char *b) {
|
valid_part_table_flag(const char *mbuffer) {
|
||||||
|
const unsigned char *b = (const unsigned char *)mbuffer;
|
||||||
return (b[510] == 0x55 && b[511] == 0xaa);
|
return (b[510] == 0x55 && b[511] == 0xaa);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2777,7 +2778,7 @@ static void create_sunlabel(void)
|
|||||||
puts(_("You may change all the disk params from the x menu"));
|
puts(_("You may change all the disk params from the x menu"));
|
||||||
}
|
}
|
||||||
|
|
||||||
snprintf(sunlabel->info, sizeof(sunlabel->info),
|
snprintf((char *)(sunlabel->info), sizeof(sunlabel->info),
|
||||||
"%s%s%s cyl %d alt %d hd %d sec %d",
|
"%s%s%s cyl %d alt %d hd %d sec %d",
|
||||||
p ? p->vendor : "", (p && *p->vendor) ? " " : "",
|
p ? p->vendor : "", (p && *p->vendor) ? " " : "",
|
||||||
p ? p->model
|
p ? p->model
|
||||||
@ -3630,7 +3631,7 @@ static const char *partition_type(unsigned char type)
|
|||||||
const struct systypes *types = get_sys_types();
|
const struct systypes *types = get_sys_types();
|
||||||
|
|
||||||
for (i=0; types[i].name; i++)
|
for (i=0; types[i].name; i++)
|
||||||
if (types[i].name[0] == type)
|
if ((unsigned char )types[i].name[0] == type)
|
||||||
return types[i].name + 1;
|
return types[i].name + 1;
|
||||||
|
|
||||||
return _("Unknown");
|
return _("Unknown");
|
||||||
@ -3664,7 +3665,8 @@ void list_types(const struct systypes *sys)
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
printf("%c%2x %-15.15s", i ? ' ' : '\n',
|
printf("%c%2x %-15.15s", i ? ' ' : '\n',
|
||||||
sys[next].name[0], partition_type(sys[next].name[0]));
|
(unsigned char)sys[next].name[0],
|
||||||
|
partition_type((unsigned char)sys[next].name[0]));
|
||||||
next = last[i++] + done;
|
next = last[i++] + done;
|
||||||
if (i > 3 || next >= last[i]) {
|
if (i > 3 || next >= last[i]) {
|
||||||
i = 0;
|
i = 0;
|
||||||
@ -3932,7 +3934,7 @@ get_kernel_geometry(void) {
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
get_partition_table_geometry(void) {
|
get_partition_table_geometry(void) {
|
||||||
const unsigned char *bufp = MBRbuffer;
|
const unsigned char *bufp = (const unsigned char *)MBRbuffer;
|
||||||
struct partition *p;
|
struct partition *p;
|
||||||
int i, h, s, hh, ss;
|
int i, h, s, hh, ss;
|
||||||
int first = 1;
|
int first = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user