From 5089d4a559eb3a0a0f008ad00ba8c5ed8bbc94c6 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Tue, 29 Dec 2015 23:15:01 +0100 Subject: fix compiler warnings in hurd/utils utils: Fix compiler warnings. * utils/rpcscan.c (setup_extract_target): Remove name variable. * utils/rpcscan.c (setup_extract_target): Fix bad initializer. * utils/rpctrace.c (new_send_wrapper, wrap_all_threads, wrap_new_thread, wrap_new_task, traced_spawn): Fix format strings. * utils/rpctrace.c (trace_and_forward): Cast to unsigned int. * utils/rpctrace.c (trace_and_forward): Use memcmp instead of pointer dereferencing to compare structures. * utils/rpctrace.c (wrap_all_threads): Cast to vm_address_t. * utils/rpctrace.c (main): Fix bad initializer. * utils/shd.c (run): Initialize save0. * utils/vminfo.c: Fix format strings. * utils/vmstat.c: Remove PSEP macro and expand the code. * utils/w.c (add_utmp_procs): Remove unused pos variable. --- utils/vminfo.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'utils/vminfo.c') diff --git a/utils/vminfo.c b/utils/vminfo.c index 6ead677e..2718591d 100644 --- a/utils/vminfo.c +++ b/utils/vminfo.c @@ -182,29 +182,29 @@ main (int argc, char **argv) if ((what & (W_ADDRS|W_SIZES)) == (W_ADDRS|W_SIZES)) { if (hex) - printf (" [%#zx] (hole)\n", addr - hole_addr); + printf (" [%#lx] (hole)\n", addr - hole_addr); else - printf (" [%zd] (hole)\n", addr - hole_addr); + printf (" [%lu] (hole)\n", addr - hole_addr); } else if ((what & (W_ADDRS|W_SIZES)) == W_SIZES) { if (hex) - printf ("%#10zx (hole)\n", addr - hole_addr); + printf ("%#10lx (hole)\n", addr - hole_addr); else - printf ("%10zu (hole)\n", addr - hole_addr); + printf ("%10lu (hole)\n", addr - hole_addr); } } if ((what & (W_ADDRS|W_SIZES)) == (W_ADDRS|W_SIZES)) if (hex) - printf ("%#10zx[%#zx]", addr, size); + printf ("%#10lx[%#zx]", addr, size); else - printf ("%10zu[%zd]", addr, size); + printf ("%10lu[%zd]", addr, size); else if ((what & (W_ADDRS|W_SIZES)) == W_ADDRS) if (hex) - printf ("%#10zx", addr); + printf ("%#10lx", addr); else - printf ("%10zu", addr); + printf ("%10lu", addr); else if ((what & (W_ADDRS|W_SIZES)) == W_SIZES) { if (hex) @@ -222,13 +222,13 @@ main (int argc, char **argv) if (shared) printf (", shared"); if (obj != MACH_PORT_NULL) - printf (", mem_obj=%d", obj); + printf (", mem_obj=%lu", obj); if (offs != 0) { if (hex) - printf (", offs=%#zx", offs); + printf (", offs=%#lx", offs); else - printf (", offs=%zd", offs); + printf (", offs=%lu", offs); } putchar (')'); } -- cgit v1.2.3