From 434d50853d65d79bd10f742e1f4c6fa4e9f0e3c6 Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Sat, 25 Jan 2020 23:33:08 +0100 Subject: NXdispatch.c, Reconnect.c: fix format specifiers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix these warnings with NX_DEBUG_INPUT enabled: NXdispatch.c: In function ‘Dispatch’: NXdispatch.c:350:74: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘CARD32’ {aka ‘unsigned int’} [-Wformat=] fprintf(stderr, "Session: Session started at '%s' timestamp [%lu].\n", ~~^ %u GetTimeAsString(), GetTimeInMillis()); Reconnect.c: In function ‘nxagentHandleConnectionStates’: Reconnect.c:303:74: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘CARD32’ {aka ‘unsigned int’} [-Wformat=] fprintf(stderr, "Session: Session suspended at '%s' timestamp [%lu].\n", GetTimeAsString(), GetTimeInMillis()); ~~^ ~~~~~~~~~~~~~~~~~ %u Reconnect.c: In function ‘nxagentReconnectSession’: Reconnect.c:673:66: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘CARD32’ {aka ‘unsigned int’} [-Wformat=] fprintf(stderr, "Session: Session resumed at '%s' timestamp [%lu].\n", GetTimeAsString(), GetTimeInMillis()); ~~^ ~~~~~~~~~~~~~~~~~ %u --- nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c | 2 +- nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c index 27d962796..dc3b2dcd9 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c @@ -345,7 +345,7 @@ Reply Total Cached Bits In Bits Out Bits/Reply Ratio (nxagentOption(Xdmcp) == 0 || nxagentXdmcpUp == 1)) { #ifdef NX_DEBUG_INPUT - fprintf(stderr, "Session: Session started at '%s' timestamp [%lu].\n", + fprintf(stderr, "Session: Session started at '%s' timestamp [%u].\n", GetTimeAsString(), GetTimeInMillis()); #else fprintf(stderr, "Session: Session started at '%s'.\n", diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index 515ffefa0..9858924d3 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -301,7 +301,7 @@ TODO: This should be reset only when if ((dispatchException & DE_TERMINATE) == 0) { #ifdef NX_DEBUG_INPUT - fprintf(stderr, "Session: Session suspended at '%s' timestamp [%lu].\n", GetTimeAsString(), GetTimeInMillis()); + fprintf(stderr, "Session: Session suspended at '%s' timestamp [%u].\n", GetTimeAsString(), GetTimeInMillis()); #else fprintf(stderr, "Session: Session suspended at '%s'.\n", GetTimeAsString()); #endif @@ -674,7 +674,7 @@ Bool nxagentReconnectSession(void) nxagentInitKeystrokes(True); #ifdef NX_DEBUG_INPUT - fprintf(stderr, "Session: Session resumed at '%s' timestamp [%lu].\n", GetTimeAsString(), GetTimeInMillis()); + fprintf(stderr, "Session: Session resumed at '%s' timestamp [%u].\n", GetTimeAsString(), GetTimeInMillis()); #else fprintf(stderr, "Session: Session resumed at '%s'.\n", GetTimeAsString()); #endif -- cgit v1.2.3