[lttng-dev] [PATCH] Fix: 32bit values index_major/minor used as 64bit

Jérémie Galarneau jeremie.galarneau at efficios.com
Tue Aug 18 17:36:15 EDT 2015


Merged in both master and stable-1.2.

Thanks!
Jérémie

On Tue, Aug 18, 2015 at 3:39 PM, Michael Jeanson <mjeanson at efficios.com> wrote:
> 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
>



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list