Fix: common: va_list type is implementation dependant
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Fri, 3 May 2019 22:26:57 +0000 (18:26 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Fri, 3 May 2019 22:48:58 +0000 (18:48 -0400)
commit2c2a5bf944c7d0e3f5e2595a92b448b57bd625cf
tree431de0c6c91ba691d1380687ee43a225a1c031d4
parent11476be369af3c9e283803c64c494f21dfc79e06
Fix: common: va_list type is implementation dependant

Issue
=====
BT_ASSERT(*args) happens to work on some library implementations because
the va_list type happens to be a pointer but this is not true with all
libraries. For example, compiling on arm64 results in the following
error:
  In file included from common.c:34:0:
  common.c: In function ‘bt_common_custom_vsnprintf’:
  ../include/babeltrace/assert-internal.h:42:7: error: wrong type
  argument to unary exclamation mark
     if (!(_cond)) {                                                \
         ^
  common.c:1524:2: note: in expansion of macro ‘BT_ASSERT’
    BT_ASSERT(*args);
    ^~~~~~~~~

Solution
========
Remove that BT_ASSERT() call as its intent is unclear anyway.

Drawback
========
None.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: Iada5189ef4580e48caefed12835bfab7c23eaf73
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1253
CI-Build: Jérémie Galarneau <jeremie.galarneau@efficios.com>
Reviewed-by: Michael Jeanson <mjeanson@efficios.com>
Reviewed-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
common/common.c
This page took 0.025493 seconds and 4 git commands to generate.