Project

General

Profile

Actions

Bug #84

closed

coherency between const and non-const parameters

Added by Julien Desfossez almost 13 years ago. Updated almost 13 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Julien Desfossez
Category:
-
Target version:
Start date:
02/21/2012
Due date:
% Done:

0%

Estimated time:

Description

The get_field and get_field_list functions return const pointers, but the functions to extract the data from these fields (get_uint64 and others) don't specify a const pointer as argument, which produces a warning when using the library.

Added by Julien Desfossez almost 13 years ago

Revision da320b83 (diff)

Fix : coherency in const parameters

This patchs adds the const attribute to the field access functions
(get_int64 and others) in order to keep the coherency with the get_field
and get_field_list function which return a const pointer.

fixes #84

Signed-off-by: Julien Desfossez <>
Signed-off-by: Mathieu Desnoyers <>

Added by Simon Marchi 8 months ago

Revision f90b6191 (diff)

span-lite: backport fix to avoid -Wundef error in C++20

When building babeltrace as C++20, I get:

CXX      clock-correlation-validator/clock-correlation-validator.lo
In file included from /home/smarchi/src/babeltrace/src/cpp-common/bt2s/span.hpp:18,
from /home/smarchi/src/babeltrace/src/cpp-common/bt2c/logging.hpp:25,
from /home/smarchi/src/babeltrace/src/cpp-common/bt2/component-class-dev.hpp:15,
from /home/smarchi/src/babeltrace/src/cpp-common/bt2/component-class.hpp:15,
from /home/smarchi/src/babeltrace/src/cpp-common/bt2/error.hpp:20,
from /home/smarchi/src/babeltrace/src/cpp-common/bt2/wrap.hpp:15,
from /home/smarchi/src/babeltrace/src/clock-correlation-validator/clock-correlation-validator.cpp:9:
/home/smarchi/src/babeltrace/src/cpp-common/vendor/span-lite/span.hpp:43:33: error: "span_HAVE_STRUCT_BINDING" is not defined, evaluates to 0 [-Werror=undef]
43 | #define span_HAVE( feature ) ( span_HAVE_##feature ) | ^~~~~~~~
/home/smarchi/src/babeltrace/src/cpp-common/vendor/span-lite/span.hpp:1873:5: note: in expansion of macro 'span_HAVE'
1873 | #if span_HAVE( STRUCT_BINDING ) | ^~~~~~~

Backport commit b8921715cd71 ("Guard section for tuple interface to only
use with nonstd::span; fixes #84 (thanks @simark)") from the upstream
repo [1]

[1] https://github.com/martinmoene/span-lite/commit/b8921715cd71997bdab120a8ced526b78d300196

Change-Id: I84b21f8157f7bf44e02e67789cfa1fee2a38da05
Signed-off-by: Simon Marchi <>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/12525

Actions

Also available in: Atom PDF