From adeeb9990e6302482b38267fd517a2516d5b9e2a Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Tue, 29 Dec 2015 22:48:16 +0100 Subject: fix compiler warnings in hurd/libshouldbeinlibc --- libshouldbeinlibc/portinfo.c | 8 ++++---- libshouldbeinlibc/ugids-verify-auth.c | 5 +++-- libshouldbeinlibc/xportinfo.c | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) (limited to 'libshouldbeinlibc') diff --git a/libshouldbeinlibc/portinfo.c b/libshouldbeinlibc/portinfo.c index e6305c6e..f3c540f5 100644 --- a/libshouldbeinlibc/portinfo.c +++ b/libshouldbeinlibc/portinfo.c @@ -53,7 +53,7 @@ print_port_info (mach_port_t name, mach_port_type_t type, task_t task, return err; } - fprintf (stream, hex_names ? "%#6zx: " : "%6zd: ", name); + fprintf (stream, hex_names ? "%#6lx: " : "%6lu: ", name); if (type & MACH_PORT_TYPE_RECEIVE) { @@ -68,7 +68,7 @@ print_port_info (mach_port_t name, mach_port_type_t type, task_t task, fprintf (stream, " ("); if (status.mps_pset != MACH_PORT_NULL) fprintf (stream, - hex_names ? "port-set: %#zx, " : "port-set: %zd, ", + hex_names ? "port-set: %#lx, " : "port-set: %lu, ", status.mps_pset); fprintf (stream, "seqno: %zu", status.mps_seqno); if (status.mps_mscount) @@ -119,9 +119,9 @@ print_port_info (mach_port_t name, mach_port_type_t type, task_t task, fprintf (stream, " (empty)"); else { - fprintf (stream, hex_names ? " (%#zx" : " (%zu", members[0]); + fprintf (stream, hex_names ? " (%#lx" : " (%lu", members[0]); for (i = 1; i < members_len; i++) - fprintf (stream, hex_names ? ", %#zx" : ", %zu", + fprintf (stream, hex_names ? ", %#lx" : ", %lu", members[i]); fprintf (stream, ")"); munmap ((caddr_t) members, members_len * sizeof *members); diff --git a/libshouldbeinlibc/ugids-verify-auth.c b/libshouldbeinlibc/ugids-verify-auth.c index 0e85b1b6..f6991aa2 100644 --- a/libshouldbeinlibc/ugids-verify-auth.c +++ b/libshouldbeinlibc/ugids-verify-auth.c @@ -65,9 +65,10 @@ server_verify_make_auth (const char *password, { auth_t auth; struct svma_state *svma_state = hook; - error_t (*check) (io_t server, uid_t id, const char *passwd, auth_t *auth) = + /* Mig routines don't use 'const' for passwd. */ + error_t (*check) (io_t server, uid_t id, char *passwd, auth_t *auth) = is_group ? password_check_group : password_check_user; - error_t err = (*check) (svma_state->server, id, password, &auth); + error_t err = (*check) (svma_state->server, id, (char *) password, &auth); if (! err) /* PASSWORD checked out ok; the corresponding authentication is in AUTH. */ diff --git a/libshouldbeinlibc/xportinfo.c b/libshouldbeinlibc/xportinfo.c index cce6fb6c..47e6dd9a 100644 --- a/libshouldbeinlibc/xportinfo.c +++ b/libshouldbeinlibc/xportinfo.c @@ -35,7 +35,7 @@ print_xlated_port_info (mach_port_t name, mach_port_type_t type, error_t err = port_name_xlator_xlate (x, name, type, &name, &type); if (! err) { - fprintf (stream, (show & PORTINFO_HEX_NAMES) ? "%#6zx => " : "%6zd => ", + fprintf (stream, (show & PORTINFO_HEX_NAMES) ? "%#6lx => " : "%6lu => ", old_name); err = print_port_info (name, type, x->to_task, show, stream); } -- cgit v1.2.3