From: Simon Marchi Date: Mon, 25 Nov 2019 20:34:21 +0000 (-0500) Subject: lttng-ctl: add local declarations for obsolete functions in lttng-ctl.c X-Git-Tag: v2.12.0-rc1~196 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=2ec4011186d50888a448f03e42e2687e4f35b7ed;p=lttng-tools.git lttng-ctl: add local declarations for obsolete functions in lttng-ctl.c The functions concerned by this change are obsolete, but kept to avoid breaking the ABI. This patch adds local declaration for these functions to silence the following errors, when building with -Wmissing-declarations. CC lttng-ctl.lo /home/smarchi/src/lttng-tools/src/lib/lttng-ctl/lttng-ctl.c:2815:5: error: no previous declaration for ‘lttng_enable_consumer’ [-Werror=missing-declarations] int lttng_enable_consumer(struct lttng_handle *handle) ^~~~~~~~~~~~~~~~~~~~~ /home/smarchi/src/lttng-tools/src/lib/lttng-ctl/lttng-ctl.c:2823:5: error: no previous declaration for ‘lttng_disable_consumer’ [-Werror=missing-declarations] int lttng_disable_consumer(struct lttng_handle *handle) ^~~~~~~~~~~~~~~~~~~~~~ /home/smarchi/src/lttng-tools/src/lib/lttng-ctl/lttng-ctl.c:2831:5: error: no previous declaration for ‘_lttng_create_session_ext’ [-Werror=missing-declarations] int _lttng_create_session_ext(const char *name, const char *url, ^~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Simon Marchi Change-Id: I49750d7646d5823461933c13a9ec4ccef905921c Signed-off-by: Jérémie Galarneau --- diff --git a/src/lib/lttng-ctl/lttng-ctl.c b/src/lib/lttng-ctl/lttng-ctl.c index 79644ceed..7e01045fa 100644 --- a/src/lib/lttng-ctl/lttng-ctl.c +++ b/src/lib/lttng-ctl/lttng-ctl.c @@ -2812,6 +2812,7 @@ int lttng_set_consumer_url(struct lttng_handle *handle, /* * [OBSOLETE] */ +int lttng_enable_consumer(struct lttng_handle *handle); int lttng_enable_consumer(struct lttng_handle *handle) { return -ENOSYS; @@ -2820,6 +2821,7 @@ int lttng_enable_consumer(struct lttng_handle *handle) /* * [OBSOLETE] */ +int lttng_disable_consumer(struct lttng_handle *handle); int lttng_disable_consumer(struct lttng_handle *handle) { return -ENOSYS; @@ -2828,6 +2830,8 @@ int lttng_disable_consumer(struct lttng_handle *handle) /* * [OBSOLETE] */ +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) {