Fix: 32bit values index_major/minor used as 64bit
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 18 Aug 2015 19:39:41 +0000 (15:39 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 18 Aug 2015 21:33:17 +0000 (17:33 -0400)
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@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
formats/ctf/ctf.c

index 5436c2a72b9e6b65812b0105f5faf28131822ac9..74fcb5bc60fe316cf45e6926ae047a15aedd0ddf 100644 (file)
@@ -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;
This page took 0.026983 seconds and 4 git commands to generate.