From: Pierre-Alexandre Meyer Date: Thu, 3 Sep 2009 17:01:01 +0000 (-0700) Subject: hdt: fix signedness warnings X-Git-Tag: syslinux-3.84-pre1~41 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=814efda1d37f684d51998f45b15b03d39bf6259a;p=platform%2Fupstream%2Fsyslinux.git hdt: fix signedness warnings host_bus_type and interface_type are uint8_t. Force a cast when calling remove_spaces on these fields. Signed-off-by: Pierre-Alexandre Meyer --- diff --git a/com32/hdt/hdt-cli-disk.c b/com32/hdt/hdt-cli-disk.c index 109d494..bcd4400 100644 --- a/com32/hdt/hdt-cli-disk.c +++ b/com32/hdt/hdt-cli-disk.c @@ -126,7 +126,7 @@ void main_show_disk(int argc, char **argv, d->legacy_max_cylinder + 1, d->legacy_max_head + 1, d->legacy_sectors_per_track, d->edd_version, disk_size, (int) d->edd_params.bytes_per_sector, (int) d->edd_params.sectors_per_track, - remove_spaces(d->edd_params.host_bus_type), remove_spaces(d->edd_params.interface_type)); + remove_spaces((char *) d->edd_params.host_bus_type), remove_spaces((char*) d->edd_params.interface_type)); if (parse_partition_table(d, &show_partition_information)) { if (errno_disk) { @@ -182,8 +182,8 @@ void disks_summary(int argc __unused, char** argv __unused, more_printf(" EDD: Version: %X, size: %s\n", d->edd_version, disk_size); more_printf(" Host bus: %s, Interface type: %s\n\n", - remove_spaces(d->edd_params.host_bus_type), - remove_spaces(d->edd_params.interface_type)); + remove_spaces((char*) d->edd_params.host_bus_type), + remove_spaces((char*) d->edd_params.interface_type)); } } diff --git a/com32/hdt/hdt-menu-disk.c b/com32/hdt/hdt-menu-disk.c index f2cdbe4..668b7cb 100644 --- a/com32/hdt/hdt-menu-disk.c +++ b/com32/hdt/hdt-menu-disk.c @@ -174,10 +174,10 @@ static int compute_disk_module(struct s_my_menu *menu, int nb_sub_disk_menu, menu[nb_sub_disk_menu].items_count++; snprintf(buffer, sizeof buffer, "Host Bus / Interface : %s / %s", - remove_spaces(d[disk_number].edd_params.host_bus_type), + remove_spaces((char *) d[disk_number].edd_params.host_bus_type), d[disk_number].edd_params.interface_type); snprintf(statbuffer, sizeof statbuffer, "Host Bus / Interface: %s / %s", - remove_spaces(d[disk_number].edd_params.host_bus_type), + remove_spaces((char *) d[disk_number].edd_params.host_bus_type), d[disk_number].edd_params.interface_type); add_item(buffer, statbuffer, OPT_INACTIVE, NULL, 0); menu[nb_sub_disk_menu].items_count++;