From b5009ed10ca3f85844496ab48d65797b0277c740 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Thu, 4 Jul 2019 14:28:49 -0400 Subject: [PATCH] Missing define when not building with gcc MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Error encountered: ../../../../../src/compat/bitfield.h:471:2: error: unknown type name ‘_BT_DIAG_IGNORE_TYPE_LIMITS’; did you mean ‘_BT_DIAG_IGNORE’? _BT_DIAG_IGNORE_TYPE_LIMITS \ ^ ../../../../../src/compat/bitfield.h:535:2: note: in expansion of macro ‘_bt_bitfield_read_be’ _bt_bitfield_read_be(ptr, unsigned char, start, length, vptr) ^~~~~~~~~~~~~~~~~~~~ bfcr.c:473:3: note: in expansion of macro ‘bt_bitfield_read_be’ bt_bitfield_read_be(buf, uint8_t, at, field_size, v); ^~~~~~~~~~~~~~~~~~~ ../../../../../src/compat/bitfield.h:472:2: error: conflicting types for ‘_is_signed_type’ _is_signed_type = _bt_is_signed_type(__typeof__(_v)); \ ^ ../../../../../src/compat/bitfield.h:535:2: note: in expansion of macro ‘_bt_bitfield_read_be’ _bt_bitfield_read_be(ptr, unsigned char, start, length, vptr) ^~~~~~~~~~~~~~~~~~~~ bfcr.c:473:3: note: in expansion of macro ‘bt_bitfield_read_be’ bt_bitfield_read_be(buf, uint8_t, at, field_size, v); ^~~~~~~~~~~~~~~~~~~ ../../../../../src/compat/bitfield.h:458:7: note: previous declaration of ‘_is_signed_type’ was here bool _is_signed_type; \ ^ ../../../../../src/compat/bitfield.h:535:2: note: in expansion of macro ‘_bt_bitfield_read_be’ _bt_bitfield_read_be(ptr, unsigned char, start, length, vptr) ^~~~~~~~~~~~~~~~~~~~ bfcr.c:473:3: note: in expansion of macro ‘bt_bitfield_read_be’ bt_bitfield_read_be(buf, uint8_t, at, field_size, v); ^~~~~~~~~~~~~~~~~~~ ../../../../../src/compat/bitfield.h:399:2: error: unknown type name ‘_BT_DIAG_IGNORE_TYPE_LIMITS’; did you mean ‘_BT_DIAG_IGNORE’? _BT_DIAG_IGNORE_TYPE_LIMITS \ ^ ../../../../../src/compat/bitfield.h:532:2: note: in expansion of macro ‘_bt_bitfield_read_le’ _bt_bitfield_read_le(ptr, type, start, length, vptr) ^~~~~~~~~~~~~~~~~~~~ bfcr.c:476:3: note: in expansion of macro ‘bt_bitfield_read_le’ bt_bitfield_read_le(buf, uint8_t, at, field_size, v); ^~~~~~~~~~~~~~~~~~~ ../../../../../src/compat/bitfield.h:400:2: error: conflicting types for ‘_is_signed_type’ _is_signed_type = _bt_is_signed_type(__typeof__(_v)); \ ^ ../../../../../src/compat/bitfield.h:532:2: note: in expansion of macro ‘_bt_bitfield_read_le’ _bt_bitfield_read_le(ptr, type, start, length, vptr) ^~~~~~~~~~~~~~~~~~~~ bfcr.c:476:3: note: in expansion of macro ‘bt_bitfield_read_le’ bt_bitfield_read_le(buf, uint8_t, at, field_size, v); ^~~~~~~~~~~~~~~~~~~ ../../../../../src/compat/bitfield.h:386:7: note: previous declaration of ‘_is_signed_type’ was here bool _is_signed_type; \ ^ ../../../../../src/compat/bitfield.h:532:2: note: in expansion of macro ‘_bt_bitfield_read_le’ _bt_bitfield_read_le(ptr, type, start, length, vptr) ^~~~~~~~~~~~~~~~~~~~ bfcr.c:476:3: note: in expansion of macro ‘bt_bitfield_read_le’ bt_bitfield_read_le(buf, uint8_t, at, field_size, v); ^~~~~~~~~~~~~~~~~~~ bfcr.c: In function ‘read_signed_bitfield’: ../../../../../src/compat/bitfield.h:471:2: error: unknown type name ‘_BT_DIAG_IGNORE_TYPE_LIMITS’; did you mean ‘_BT_DIAG_IGNORE’? _BT_DIAG_IGNORE_TYPE_LIMITS \ ^ ../../../../../src/compat/bitfield.h:535:2: note: in expansion of macro ‘_bt_bitfield_read_be’ _bt_bitfield_read_be(ptr, unsigned char, start, length, vptr) ^~~~~~~~~~~~~~~~~~~~ bfcr.c:492:3: note: in expansion of macro ‘bt_bitfield_read_be’ bt_bitfield_read_be(buf, uint8_t, at, field_size, v); ^~~~~~~~~~~~~~~~~~~ ../../../../../src/compat/bitfield.h:472:2: error: conflicting types for ‘_is_signed_type’ _is_signed_type = _bt_is_signed_type(__typeof__(_v)); \ ^ ../../../../../src/compat/bitfield.h:535:2: note: in expansion of macro ‘_bt_bitfield_read_be’ _bt_bitfield_read_be(ptr, unsigned char, start, length, vptr) ^~~~~~~~~~~~~~~~~~~~ bfcr.c:492:3: note: in expansion of macro ‘bt_bitfield_read_be’ bt_bitfield_read_be(buf, uint8_t, at, field_size, v); ^~~~~~~~~~~~~~~~~~~ ../../../../../src/compat/bitfield.h:458:7: note: previous declaration of ‘_is_signed_type’ was here bool _is_signed_type; \ ^ ../../../../../src/compat/bitfield.h:535:2: note: in expansion of macro ‘_bt_bitfield_read_be’ _bt_bitfield_read_be(ptr, unsigned char, start, length, vptr) ^~~~~~~~~~~~~~~~~~~~ bfcr.c:492:3: note: in expansion of macro ‘bt_bitfield_read_be’ bt_bitfield_read_be(buf, uint8_t, at, field_size, v); ^~~~~~~~~~~~~~~~~~~ ../../../../../src/compat/bitfield.h:399:2: error: unknown type name ‘_BT_DIAG_IGNORE_TYPE_LIMITS’; did you mean ‘_BT_DIAG_IGNORE’? _BT_DIAG_IGNORE_TYPE_LIMITS \ ^ ../../../../../src/compat/bitfield.h:532:2: note: in expansion of macro ‘_bt_bitfield_read_le’ _bt_bitfield_read_le(ptr, type, start, length, vptr) ^~~~~~~~~~~~~~~~~~~~ bfcr.c:495:3: note: in expansion of macro ‘bt_bitfield_read_le’ bt_bitfield_read_le(buf, uint8_t, at, field_size, v); ^~~~~~~~~~~~~~~~~~~ ../../../../../src/compat/bitfield.h:400:2: error: conflicting types for ‘_is_signed_type’ _is_signed_type = _bt_is_signed_type(__typeof__(_v)); \ ^ ../../../../../src/compat/bitfield.h:532:2: note: in expansion of macro ‘_bt_bitfield_read_le’ _bt_bitfield_read_le(ptr, type, start, length, vptr) ^~~~~~~~~~~~~~~~~~~~ bfcr.c:495:3: note: in expansion of macro ‘bt_bitfield_read_le’ bt_bitfield_read_le(buf, uint8_t, at, field_size, v); ^~~~~~~~~~~~~~~~~~~ ../../../../../src/compat/bitfield.h:386:7: note: previous declaration of ‘_is_signed_type’ was here bool _is_signed_type; \ ^ ../../../../../src/compat/bitfield.h:532:2: note: in expansion of macro ‘_bt_bitfield_read_le’ _bt_bitfield_read_le(ptr, type, start, length, vptr) ^~~~~~~~~~~~~~~~~~~~ bfcr.c:495:3: note: in expansion of macro ‘bt_bitfield_read_le’ bt_bitfield_read_le(buf, uint8_t, at, field_size, v); ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Jonathan Rajotte Change-Id: Ie9438e87c69f21ad4062b277d26ee09551ae4c97 Reviewed-on: https://review.lttng.org/c/babeltrace/+/1629 Reviewed-by: Simon Marchi Reviewed-by: Philippe Proulx Tested-by: jenkins --- src/compat/bitfield.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compat/bitfield.h b/src/compat/bitfield.h index a24904bd..5e5a046f 100644 --- a/src/compat/bitfield.h +++ b/src/compat/bitfield.h @@ -59,6 +59,7 @@ # define _BT_DIAG_PUSH # define _BT_DIAG_POP # define _BT_DIAG_IGNORE +# define _BT_DIAG_IGNORE_TYPE_LIMITS #endif #define _bt_is_signed_type(type) ((type) -1 < (type) 0) -- 2.34.1