From 89200512b3c58ab604b9ba3129734ddf47ff85d5 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Fri, 6 Jul 2007 00:47:44 +0000 Subject: [PATCH] Fix warnings. nxge: cast page size fragments down to (int). If the vm's demand paging PAGE_SIZE is ever too big for that, we've got far bigger problems. ofw: move va_start() a little earlier. gcc-4.2 doesn't like us modifying the last arg before the va_start(). Approved by: re (rwatson) --- sys/dev/nxge/if_nxge.c | 4 ++-- sys/dev/ofw/openfirm.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/nxge/if_nxge.c b/sys/dev/nxge/if_nxge.c index 6687b4b00aa8..5390120ab81e 100644 --- a/sys/dev/nxge/if_nxge.c +++ b/sys/dev/nxge/if_nxge.c @@ -252,8 +252,8 @@ xge_init_params(xge_hal_device_config_t *dconfig, device_t dev) if(dconfig->fifo.max_frags > (PAGE_SIZE/32)) { xge_os_printf("fifo_max_frags = %d", dconfig->fifo.max_frags); xge_os_printf("fifo_max_frags should be <= (PAGE_SIZE / 32) = %d", - (PAGE_SIZE / 32)); - xge_os_printf("Using fifo_max_frags = %d", (PAGE_SIZE / 32)); + (int)(PAGE_SIZE / 32)); + xge_os_printf("Using fifo_max_frags = %d", (int)(PAGE_SIZE / 32)); dconfig->fifo.max_frags = (PAGE_SIZE / 32); } diff --git a/sys/dev/ofw/openfirm.c b/sys/dev/ofw/openfirm.c index 8153431ceac4..ff889e512a33 100644 --- a/sys/dev/ofw/openfirm.c +++ b/sys/dev/ofw/openfirm.c @@ -139,9 +139,9 @@ OF_interpret(char *cmd, int nreturns, ...) cell_t status; int i = 0; + va_start(ap, nreturns); args.nreturns = ++nreturns; args.slot[i++] = (cell_t)cmd; - va_start(ap, nreturns); while (i < 1) args.slot[i++] = va_arg(ap, cell_t); if (openfirmware(&args) == -1) {