* grub-core/disk/ahci.c: Add needed explicit cast.

* grub-core/lib/backtrace.c: Likewise.
	* grub-core/net/ip.c: Likewise.
	* grub-core/net/tcp.c: Likewise.
	* grub-core/net/udp.c: Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2013-08-21 21:02:14 +02:00
parent 3c601f8c81
commit 54ea2f4401
6 changed files with 15 additions and 7 deletions

View File

@ -1,3 +1,11 @@
2013-08-21 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/disk/ahci.c: Add needed explicit cast.
* grub-core/lib/backtrace.c: Likewise.
* grub-core/net/ip.c: Likewise.
* grub-core/net/tcp.c: Likewise.
* grub-core/net/udp.c: Likewise.
2013-08-21 Vladimir Serbinenko <phcoder@gmail.com> 2013-08-21 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/lib/posix_wrap/wchar.h: Fix typo. * grub-core/lib/posix_wrap/wchar.h: Fix typo.

View File

@ -970,8 +970,8 @@ grub_ahci_readwrite_real (struct grub_ahci_device *dev,
dev->command_table[0].prdt[0].data_base, dev->command_table[0].prdt[0].data_base,
dev->command_table[0].prdt[0].unused, dev->command_table[0].prdt[0].unused,
dev->command_table[0].prdt[0].size, dev->command_table[0].prdt[0].size,
(char *) &dev->command_table[0].prdt[0] (grub_size_t) ((char *) &dev->command_table[0].prdt[0]
- (char *) &dev->command_table[0]); - (char *) &dev->command_table[0]));
if (parms->write) if (parms->write)
grub_memcpy ((char *) grub_dma_get_virt (bufc), parms->buffer, parms->size); grub_memcpy ((char *) grub_dma_get_virt (bufc), parms->buffer, parms->size);

View File

@ -39,7 +39,7 @@ grub_backtrace_print_address (void *addr)
+ segment->size > (grub_uint8_t *) addr) + segment->size > (grub_uint8_t *) addr)
{ {
grub_printf ("%s.%x+%" PRIxGRUB_SIZE, mod->name, segment->section, grub_printf ("%s.%x+%" PRIxGRUB_SIZE, mod->name, segment->section,
(grub_uint8_t *) addr - (grub_uint8_t *) segment->addr); (grub_size_t) ((grub_uint8_t *) addr - (grub_uint8_t *) segment->addr));
return; return;
} }
} }

View File

@ -403,7 +403,7 @@ grub_net_recv_ip4_packets (struct grub_net_buff *nb,
* sizeof (grub_uint32_t))) * sizeof (grub_uint32_t)))
{ {
grub_dprintf ("net", "IP packet too short: %" PRIdGRUB_SSIZE "\n", grub_dprintf ("net", "IP packet too short: %" PRIdGRUB_SSIZE "\n",
(nb->tail - nb->data)); (grub_ssize_t) (nb->tail - nb->data));
grub_netbuff_free (nb); grub_netbuff_free (nb);
return GRUB_ERR_NONE; return GRUB_ERR_NONE;
} }
@ -654,7 +654,7 @@ grub_net_recv_ip6_packets (struct grub_net_buff *nb,
if (nb->tail - nb->data < (grub_ssize_t) sizeof (*iph)) if (nb->tail - nb->data < (grub_ssize_t) sizeof (*iph))
{ {
grub_dprintf ("net", "IP packet too short: %" PRIdGRUB_SSIZE "\n", grub_dprintf ("net", "IP packet too short: %" PRIdGRUB_SSIZE "\n",
nb->tail - nb->data); (grub_ssize_t) (nb->tail - nb->data));
grub_netbuff_free (nb); grub_netbuff_free (nb);
return GRUB_ERR_NONE; return GRUB_ERR_NONE;
} }

View File

@ -766,7 +766,7 @@ grub_net_recv_tcp_packet (struct grub_net_buff *nb,
>> 12) * sizeof (grub_uint32_t))) >> 12) * sizeof (grub_uint32_t)))
{ {
grub_dprintf ("net", "TCP packet too short: %" PRIuGRUB_SIZE "\n", grub_dprintf ("net", "TCP packet too short: %" PRIuGRUB_SIZE "\n",
nb->tail - nb->data); (grub_size_t) (nb->tail - nb->data));
grub_netbuff_free (nb); grub_netbuff_free (nb);
return GRUB_ERR_NONE; return GRUB_ERR_NONE;
} }

View File

@ -155,7 +155,7 @@ grub_net_recv_udp_packet (struct grub_net_buff *nb,
if (nb->tail - nb->data < (grub_ssize_t) sizeof (*udph)) if (nb->tail - nb->data < (grub_ssize_t) sizeof (*udph))
{ {
grub_dprintf ("net", "UDP packet too short: %" PRIuGRUB_SIZE "\n", grub_dprintf ("net", "UDP packet too short: %" PRIuGRUB_SIZE "\n",
nb->tail - nb->data); (grub_size_t) (nb->tail - nb->data));
grub_netbuff_free (nb); grub_netbuff_free (nb);
return GRUB_ERR_NONE; return GRUB_ERR_NONE;
} }