From 0f0be7f75153923afb3241b07b89773c97f92022 Mon Sep 17 00:00:00 2001 From: Flavio Cruz <flaviocruz@gmail.com> Date: Sat, 28 Jan 2023 01:02:25 -0500 Subject: Fix compiler warnings * i386/xen/xen.c: Move failsafe_callback_regs to header file and include xen/xen.h * xen/block.c: `name` must be const. Fix format string. * xen/console.c: Move hyp_console_write and inline it in the header. Use static qualifier whenever possible. Cast to interrupt_handler_fn. * xen/console.h: Define hyp_console_write as inline function. * xen/evt.c: Avoid old style declaration and use interrupt_handler_fn. * xen/evt.h: Use interrupt_handler_fn. * xen/net.c: Use static. Use correct format and make `name` const. * xen/time.c: Avoid old style declarations by adding void to the parameter list. * xen/xen.c: Use static. Use interrupt_handler_fn. Delete `_hyp_halt` and `_hyp_todo`. * xen/xen.h: Define hyp_failsafe_c_callback here to make sure we have the prototype. Message-Id: <Y9S6cTHziR/edeFu@jupiter.tail36e24.ts.net> --- xen/net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xen/net.c') diff --git a/xen/net.c b/xen/net.c index bec61661..b72844d5 100644 --- a/xen/net.c +++ b/xen/net.c @@ -76,7 +76,7 @@ static struct net_data *vif_data; struct device_emulation_ops hyp_net_emulation_ops; -int hextoi(char *cp, int *nump) +static int hextoi(char *cp, int *nump) { int number; char *original; @@ -477,7 +477,7 @@ void hyp_net_init(void) { nd->rx_buf_pfn[i] = atop(addr); if (!nd->rx_copy) { if (hyp_do_update_va_mapping(kvtolin(nd->rx_buf[i]), 0, UVMF_INVLPG|UVMF_ALL)) - panic("eth: couldn't clear rx kv buf %d at %lx", i, addr); + panic("eth: couldn't clear rx kv buf %d at %llx", i, addr); } /* and enqueue it to backend. */ enqueue_rx_buf(nd, i); @@ -536,7 +536,7 @@ device_close(void *devp) static io_return_t device_open (ipc_port_t reply_port, mach_msg_type_name_t reply_port_type, - dev_mode_t mode, char *name, device_t *devp /* out */) + dev_mode_t mode, const char *name, device_t *devp /* out */) { int i, n; ipc_port_t port, notify; -- cgit v1.2.3