From 2c3f4c28698f497756f194ef88cd991e2cca6bb4 Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Tue, 28 Jun 2016 19:11:04 -0400 Subject: [PATCH] Fix: ctf_enum_value() does not work with g++ g++ does not support non-trivial designated initializers like C99 does, thus the fields must be initialized in order in ctf_enum_value(). Signed-off-by: Philippe Proulx Signed-off-by: Mathieu Desnoyers --- include/lttng/ust-tracepoint-event.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index d9801a8f..2b703dc5 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -132,14 +132,14 @@ static const char \ #define ctf_enum_value(_string, _value) \ { \ .start = { \ - .signedness = lttng_is_signed_type(__typeof__(_value)), \ .value = lttng_is_signed_type(__typeof__(_value)) ? \ (long long) (_value) : (_value), \ + .signedness = lttng_is_signed_type(__typeof__(_value)), \ }, \ .end = { \ - .signedness = lttng_is_signed_type(__typeof__(_value)), \ .value = lttng_is_signed_type(__typeof__(_value)) ? \ (long long) (_value) : (_value), \ + .signedness = lttng_is_signed_type(__typeof__(_value)), \ }, \ .string = (_string), \ }, @@ -149,14 +149,14 @@ static const char \ #define ctf_enum_range(_string, _range_start, _range_end) \ { \ .start = { \ - .signedness = lttng_is_signed_type(__typeof__(_range_start)), \ .value = lttng_is_signed_type(__typeof__(_range_start)) ? \ (long long) (_range_start) : (_range_start), \ + .signedness = lttng_is_signed_type(__typeof__(_range_start)), \ }, \ .end = { \ - .signedness = lttng_is_signed_type(__typeof__(_range_end)), \ .value = lttng_is_signed_type(__typeof__(_range_end)) ? \ (long long) (_range_end) : (_range_end), \ + .signedness = lttng_is_signed_type(__typeof__(_range_end)), \ }, \ .string = (_string), \ }, -- 2.34.1