From ba412a2f47d0ac68aede645178d9808fd1be100c Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 11 Jul 2017 14:48:40 -0400 Subject: [PATCH] Port: cast result of be64toh() to uint64_t for print format MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The type of the return value of be64toh() can vary from unsigned long to unsigned long long across platforms, cast it to the longer type before printing. Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- plugins/ctf/lttng-live/viewer-connection.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ctf/lttng-live/viewer-connection.c b/plugins/ctf/lttng-live/viewer-connection.c index 13b88277..2955b938 100644 --- a/plugins/ctf/lttng-live/viewer-connection.c +++ b/plugins/ctf/lttng-live/viewer-connection.c @@ -195,7 +195,7 @@ static int lttng_live_handshake(struct bt_live_viewer_connection *viewer_connect assert(ret_len == sizeof(connect)); BT_LOGD("Received viewer session ID : %" PRIu64, - be64toh(connect.viewer_session_id)); + (uint64_t) be64toh(connect.viewer_session_id)); BT_LOGD("Relayd version : %u.%u", be32toh(connect.major), be32toh(connect.minor)); -- 2.34.1