From: Michael Jeanson Date: Tue, 11 Jul 2017 18:48:40 +0000 (-0400) Subject: Port: cast result of be64toh() to uint64_t for print format X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=83c78c35b2b4ee71c100f66ad17fadebdeae367d;p=deliverable%2Fbabeltrace.git Port: cast result of be64toh() to uint64_t for print format 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 --- diff --git a/plugins/ctf/lttng-live/viewer-connection.c b/plugins/ctf/lttng-live/viewer-connection.c index 13b882774..2955b9384 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));