[lttng-dev] [PATCH] Fix: 32bit values index_major/minor used as 64bit
Michael Jeanson
mjeanson at efficios.com
Tue Aug 18 15:39:41 EDT 2015
This patch fixes compiler warnings on big endian architectures where
be64toh() is a nop and returns the original type.
Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
---
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 5436c2a..74fcb5b 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;
--
1.9.1
More information about the lttng-dev
mailing list