#include <string.h>
#include <unistd.h>
-#include <common/bytecode/bytecode.h>
-#include <common/align.h>
-#include <common/common.h>
-#include <common/compat/errno.h>
-#include <common/compat/string.h>
-#include <common/defaults.h>
-#include <common/dynamic-array.h>
-#include <common/dynamic-buffer.h>
-#include <common/payload-view.h>
-#include <common/payload.h>
-#include <common/sessiond-comm/sessiond-comm.h>
-#include <common/tracker.h>
-#include <common/unix.h>
-#include <common/uri.h>
-#include <common/utils.h>
-#include <lttng/channel-internal.h>
+#include <common/bytecode/bytecode.hpp>
+#include <common/align.hpp>
+#include <common/common.hpp>
+#include <common/compat/errno.hpp>
+#include <common/compat/string.hpp>
+#include <common/defaults.hpp>
+#include <common/dynamic-array.hpp>
+#include <common/dynamic-buffer.hpp>
+#include <common/payload-view.hpp>
+#include <common/payload.hpp>
+#include <common/sessiond-comm/sessiond-comm.hpp>
+#include <common/tracker.hpp>
+#include <common/unix.hpp>
+#include <common/uri.hpp>
+#include <common/utils.hpp>
+#include <lttng/channel-internal.hpp>
#include <lttng/destruction-handle.h>
#include <lttng/endpoint.h>
-#include <lttng/error-query-internal.h>
-#include <lttng/event-internal.h>
-#include <lttng/health-internal.h>
+#include <lttng/error-query-internal.hpp>
+#include <lttng/event-internal.hpp>
+#include <lttng/health-internal.hpp>
#include <lttng/lttng-error.h>
#include <lttng/lttng.h>
-#include <lttng/session-descriptor-internal.h>
-#include <lttng/session-internal.h>
-#include <lttng/trigger/trigger-internal.h>
-#include <lttng/userspace-probe-internal.h>
+#include <lttng/session-descriptor-internal.hpp>
+#include <lttng/session-internal.hpp>
+#include <lttng/trigger/trigger-internal.hpp>
+#include <lttng/userspace-probe-internal.hpp>
-#include "lttng-ctl-helper.h"
-#include <common/filter/filter-ast.h>
+#include "lttng-ctl-helper.hpp"
+#include <common/filter/filter-ast.hpp>
#include <common/filter/filter-parser.hpp>
-#include <common/filter/memstream.h>
+#include <common/filter/memstream.hpp>
#define COPY_DOMAIN_PACKED(dst, src) \
do { \
* Returns the size of the returned payload data or a negative error code.
*/
int lttng_add_context(struct lttng_handle *handle,
- struct lttng_event_context *ctx, const char *event_name,
+ struct lttng_event_context *ctx,
+ const char *event_name __attribute__((unused)),
const char *channel_name)
{
int ret;
- struct lttcomm_session_msg lsm = { .cmd_type = LTTNG_ADD_CONTEXT };
+ struct lttcomm_session_msg lsm = {
+ .cmd_type = LTTNG_ADD_CONTEXT,
+ .session = {},
+ .domain = {},
+ .u = {},
+ .fd_count = 0,
+ };
struct lttng_payload payload;
lttng_payload_init(&payload);
const char *original_filter_expression,
int exclusion_count, char **exclusion_list)
{
- struct lttcomm_session_msg lsm = { .cmd_type = LTTNG_ENABLE_EVENT };
+ struct lttcomm_session_msg lsm = {
+ .cmd_type = LTTNG_ENABLE_EVENT,
+ .session = {},
+ .domain = {},
+ .u = {},
+ .fd_count = 0,
+ };
struct lttng_payload payload;
int ret = 0;
unsigned int free_filter_expression = 0;
struct lttng_event *ev, const char *channel_name,
const char *original_filter_expression)
{
- struct lttcomm_session_msg lsm = { .cmd_type = LTTNG_DISABLE_EVENT };
+ struct lttcomm_session_msg lsm = {
+ .cmd_type = LTTNG_DISABLE_EVENT,
+ .session = {},
+ .domain = {},
+ .u = {},
+ .fd_count = 0,
+ };
struct lttng_payload payload;
int ret = 0;
unsigned int free_filter_expression = 0;
enum lttng_error_code ret_code;
int ret, total_payload_received;
char *reception_buffer = NULL;
- struct lttcomm_session_msg lsm = { .cmd_type = LTTNG_LIST_TRACEPOINTS };
+ struct lttcomm_session_msg lsm = {
+ .cmd_type = LTTNG_LIST_TRACEPOINTS,
+ .session = {},
+ .domain = {},
+ .u = {},
+ .fd_count = 0,
+ };
struct lttcomm_list_command_header *cmd_header = NULL;
size_t cmd_header_len;
unsigned int nb_events = 0;
enum lttng_error_code ret_code;
struct lttcomm_session_msg lsm = {
.cmd_type = LTTNG_CREATE_SESSION_EXT,
+ .session = {},
+ .domain = {},
+ .u = {},
+ .fd_count = 0,
};
void *reply = NULL;
struct lttng_buffer_view reply_view;
return ret;
}
-int lttng_calibrate(struct lttng_handle *handle,
- struct lttng_calibrate *calibrate)
+int lttng_calibrate(struct lttng_handle *handle __attribute__((unused)),
+ struct lttng_calibrate *calibrate __attribute__((unused)))
{
/*
* This command was removed in LTTng 2.9.
*/
extern "C"
LTTNG_EXPORT int lttng_enable_consumer(struct lttng_handle *handle);
-int lttng_enable_consumer(struct lttng_handle *handle)
+int lttng_enable_consumer(struct lttng_handle *handle __attribute__((unused)))
{
return -ENOSYS;
}
*/
extern "C"
LTTNG_EXPORT int lttng_disable_consumer(struct lttng_handle *handle);
-int lttng_disable_consumer(struct lttng_handle *handle)
+int lttng_disable_consumer(struct lttng_handle *handle __attribute__((unused)))
{
return -ENOSYS;
}
extern "C"
LTTNG_EXPORT int _lttng_create_session_ext(const char *name, const char *url,
const char *datetime);
-int _lttng_create_session_ext(const char *name, const char *url,
- const char *datetime)
+int _lttng_create_session_ext(const char *name __attribute__((unused)),
+ const char *url __attribute__((unused)),
+ const char *datetime __attribute__((unused)))
{
return -ENOSYS;
}
int ret;
struct lttcomm_session_msg lsm = {
.cmd_type = LTTNG_REGISTER_TRIGGER,
+ .session = {},
+ .domain = {},
+ .u = {},
+ .fd_count = 0,
};
lsm.u.trigger.is_trigger_anonymous = !name && !generate_name;
struct lttcomm_session_msg *message_lsm;
enum lttng_error_code ret_code;
struct lttcomm_session_msg lsm = {
.cmd_type = LTTNG_EXECUTE_ERROR_QUERY,
+ .session = {},
+ .domain = {},
+ .u = {},
+ .fd_count = 0,
};
struct lttng_payload message;
struct lttng_payload reply;
{
int ret;
enum lttng_error_code ret_code = LTTNG_OK;
- struct lttcomm_session_msg lsm = { .cmd_type = LTTNG_LIST_TRIGGERS };
+ struct lttcomm_session_msg lsm = {
+ .cmd_type = LTTNG_LIST_TRIGGERS,
+ .session = {},
+ .domain = {},
+ .u = {},
+ .fd_count = 0,
+ };
struct lttng_triggers *local_triggers = NULL;
struct lttng_payload reply;
struct lttng_payload_view lsm_view =