lttng-ctl: add local declarations for obsolete functions in lttng-ctl.c
authorSimon Marchi <simon.marchi@efficios.com>
Mon, 25 Nov 2019 20:34:21 +0000 (15:34 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 3 Dec 2019 05:48:49 +0000 (00:48 -0500)
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 <simon.marchi@efficios.com>
Change-Id: I49750d7646d5823461933c13a9ec4ccef905921c
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/lib/lttng-ctl/lttng-ctl.c

index 79644ceed79ae55c7c543de9d0a2af8e680f08bd..7e01045fad16db37a79d34ac0f1b206bf9869be2 100644 (file)
@@ -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)
 {
This page took 0.027049 seconds and 4 git commands to generate.