Tests: test_session: fix conditionally-supported offsetof warning
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 Sep 2024 19:25:34 +0000 (19:25 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 5 Sep 2024 19:25:34 +0000 (19:25 +0000)
commit9e0f2f64da1331fe8a4b15ee9637590a665ddd68
tree98299ef7dae39aac46d13059860faf6296f39eb0
parent2ba05e13f2ae5c6541d5f902694eb22f1ed2350c
Tests: test_session: fix conditionally-supported offsetof warning

g++ produces the following warning when building test_session on the CI:

  /home/jenkins/workspace/dev_review_lttng-tools_master_linuxbuild/babeltrace_version/stable-2.0/build/std/conf/std/liburcu_version/stable-0.14/platform/deb12-amd64/deps/build/include/urcu/list.h:160:49: warning: ‘offsetof’ within non-standard-layout type ‘ltt_session’ is conditionally-supported [-Winvalid-offsetof]
     160 |         for (pos = cds_list_entry((head)->next, __typeof__(*(pos)), member); \
   /home/jenkins/workspace/dev_review_lttng-tools_master_linuxbuild/babeltrace_version/stable-2.0/build/std/conf/std/liburcu_version/stable-0.14/platform/deb12-amd64/deps/build/include/urcu/list.h:126:49: note: in expansion of macro ‘caa_container_of’
     126 | #define cds_list_entry(ptr, type, member)       caa_container_of(ptr, type, member)
         |                                                 ^~~~~~~~~~~~~~~~

Replace the problematic liburcu macros with the C++-ified internal
replacement wrappers.

Change-Id: I1396e9f6e1d99710150e03cabc33d07df3d8558a
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
tests/unit/test_session.cpp
This page took 0.026168 seconds and 4 git commands to generate.