From 2b8dbf9af7c51db61a476550c44bb22b0b50a43d Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 18 Aug 2015 15:39:41 -0400 Subject: [PATCH] Fix: 32bit values index_major/minor used as 64bit MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch fixes compiler warnings on big endian architectures where be64toh() is a nop and returns the original type. Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- formats/ctf/ctf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 5436c2a7..74fcb5bc 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -1853,10 +1853,10 @@ int import_stream_packet_index(struct ctf_trace *td, goto error; } if (be32toh(index_hdr.index_major) != CTF_INDEX_MAJOR) { - fprintf(stderr, "[error] Incompatible index file %" PRIu64 - ".%" PRIu64 ", supported %d.%d\n", - be64toh(index_hdr.index_major), - be64toh(index_hdr.index_minor), CTF_INDEX_MAJOR, + fprintf(stderr, "[error] Incompatible index file %" PRIu32 + ".%" PRIu32 ", supported %d.%d\n", + be32toh(index_hdr.index_major), + be32toh(index_hdr.index_minor), CTF_INDEX_MAJOR, CTF_INDEX_MINOR); ret = -1; goto error; -- 2.34.1