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:34:50 +0000 (17:34 -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 40da01da2d57619d1257fc42a4666923afaaeaa2..29fa5984a110b8421287308bb1c3a4998fe1a4ce 100644 (file)
@@ -1855,10 +1855,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.032187 seconds and 4 git commands to generate.