-AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include
+AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/plugins
noinst_HEADERS = \
fs.h \
#include <babeltrace/component/notification/event.h>
#include <babeltrace/component/notification/packet.h>
#include <babeltrace/component/notification/heap.h>
+#include <plugins-common.h>
#include <glib.h>
#include <assert.h>
#include <unistd.h>
BT_HIDDEN
enum bt_component_status ctf_fs_init(struct bt_component *source,
- struct bt_value *params, void *init_method_data)
+ struct bt_value *params, UNUSED_VAR void *init_method_data)
{
struct ctf_fs_component *ctf_fs;
enum bt_component_status ret = BT_COMPONENT_STATUS_OK;
- (void) init_method_data;
assert(source);
ctf_fs_debug = g_strcmp0(getenv("CTF_FS_DEBUG"), "1") == 0;
-AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include
+AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/plugins
libbabeltrace_plugin_ctf_lttng_live_la_SOURCES = lttng-live.c
#include "lttng-live-internal.h"
#include <babeltrace/component/component-source.h>
+#include <plugins-common.h>
BT_HIDDEN
enum bt_component_status lttng_live_iterator_init(struct bt_component *source,
struct bt_notification_iterator *it)
{
+ return BT_COMPONENT_STATUS_OK;
}
BT_HIDDEN
enum bt_component_status lttng_live_init(struct bt_component *component,
- struct bt_value *params, void *init_method_data)
+ struct bt_value *params, UNUSED_VAR void *init_method_data)
{
return BT_COMPONENT_STATUS_OK;
}
-AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include
+AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/plugins
SUBDIRS = .
#include <babeltrace/component/notification/notification.h>
#include <babeltrace/component/notification/iterator.h>
#include <babeltrace/component/notification/event.h>
+#include <plugins-common.h>
#include "muxer.h"
static
enum bt_component_status muxer_component_init(
struct bt_component *component, struct bt_value *params,
- void *init_method_data)
+ UNUSED_VAR void *init_method_data)
{
enum bt_component_status ret;
struct muxer *muxer = create_muxer();
- (void) init_method_data;
if (!muxer) {
ret = BT_COMPONENT_STATUS_NOMEM;
--- /dev/null
+#ifndef PLUGINS_COMMON_H
+#define PLUGINS_COMMON_H
+
+/*
+ * Copyright 2017 Philippe Proulx <pproulx@efficios.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+/*
+ * UNUSED_VAR: tag a variable or parameter as explicitly unused so that
+ * the compiler does not warn.
+ */
+#define UNUSED_VAR __attribute__((unused))
+
+#endif /* PLUGINS_COMMON_H */
-AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include
+AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/plugins
SUBDIRS = .
#include <babeltrace/component/notification/event.h>
#include <babeltrace/values.h>
#include <babeltrace/compiler.h>
+#include <plugins-common.h>
#include <stdio.h>
#include <stdbool.h>
#include <glib.h>
static
enum bt_component_status text_component_init(
struct bt_component *component, struct bt_value *params,
- void *init_method_data)
+ UNUSED_VAR void *init_method_data)
{
enum bt_component_status ret;
struct text_component *text = create_text();
- (void) init_method_data;
if (!text) {
ret = BT_COMPONENT_STATUS_NOMEM;
-AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include
+AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/plugins
SUBDIRS = .
#include <babeltrace/component/notification/notification.h>
#include <babeltrace/component/notification/iterator.h>
#include <babeltrace/component/notification/event.h>
+#include <plugins-common.h>
#include "trimmer.h"
#include "iterator.h"
#include <assert.h>
enum bt_component_status trimmer_component_init(
struct bt_component *component, struct bt_value *params,
- void *init_method_data)
+ UNUSED_VAR void *init_method_data)
{
enum bt_component_status ret;
struct trimmer *trimmer = create_trimmer_data();
- (void) init_method_data;
if (!trimmer) {
ret = BT_COMPONENT_STATUS_NOMEM;
-AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include
+AM_CFLAGS = $(PACKAGE_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/plugins
SUBDIRS = .
#include <babeltrace/component/notification/iterator.h>
#include <babeltrace/component/notification/event.h>
#include <babeltrace/component/notification/packet.h>
+#include <plugins-common.h>
#include <stdio.h>
#include <stdbool.h>
#include <glib.h>
static
enum bt_component_status writer_component_init(
struct bt_component *component, struct bt_value *params,
- void *init_method_data)
+ UNUSED_VAR void *init_method_data)
{
enum bt_component_status ret;
enum bt_value_status value_ret;
struct writer_component *writer_component = create_writer_component();
struct bt_value *value = NULL;
const char *path;
- (void) init_method_data;
if (!writer_component) {
ret = BT_COMPONENT_STATUS_NOMEM;