This fixes all the remaining -Wmissing-declarations warning occurences.
The changes either:
- Make functions static
- Remove unused functions
- Add declarations for functions that are meant to be exported in a
shared object to override some other function (e.g.
lttng_ust_clock_plugin_init). There isn't really a better place for
these declarations.
Change-Id: If08855b75bf44dfdcfbdd654c272474ad8ebef39
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
// This makes the typemap code useable with both Python 2 and 3.
#define PyInt_AsSsize_t PyLong_AsSsize_t
#endif
+
+// Avoid -Wmissing-declarations warning.
+PyObject *SWIG_init(void);
%}
typedef unsigned int uint32_t;
int value;
};
+static
void test_select_big(void)
{
fd_set rfds, wfds, exfds;
return;
}
+static
void test_pselect(void)
{
fd_set rfds;
}
+static
void test_select(void)
{
fd_set rfds;
}
+static
void test_poll(void)
{
struct pollfd ufds[NB_FD];
}
}
+static
void test_ppoll(void)
{
struct pollfd ufds[NB_FD];
}
}
+static
void test_ppoll_big(void)
{
struct pollfd ufds[MAX_FDS];
return;
}
+static
void test_epoll(void)
{
int ret, epollfd;
return;
}
+static
void test_pepoll(void)
{
int ret, epollfd;
return;
}
+static
void run_working_cases(void)
{
int ret;
* segfault (eventually with a "*** stack smashing detected ***" message).
* The event should contain an array of 100 FDs filled with garbage.
*/
+static
void ppoll_fds_buffer_overflow(void)
{
struct pollfd ufds[NB_FD];
* cleanly fail with a "Invalid argument".
* The event should contain an empty array of FDs and overflow = 1.
*/
+static
void ppoll_fds_ulong_max(void)
{
struct pollfd ufds[NB_FD];
* Pass an invalid file descriptor to pselect6(). The syscall should return
* -EBADF. The recorded event should contain a "ret = -EBADF (-9)".
*/
+static
void pselect_invalid_fd(void)
{
fd_set rfds;
* Invalid pointer as writefds, should output a ppoll event
* with 0 FDs.
*/
+static
void pselect_invalid_pointer(void)
{
fd_set rfds;
* Pass an invalid pointer to epoll_pwait, should fail with
* "Bad address", the event returns 0 FDs.
*/
+static
void epoll_pwait_invalid_pointer(void)
{
int ret, epollfd;
* Set maxevents to INT_MAX, should output "Invalid argument"
* The event should return an empty array.
*/
+static
void epoll_pwait_int_max(void)
{
int ret, epollfd;
return;
}
+static
void *ppoll_writer(void *arg)
{
struct ppoll_thread_data *data = (struct ppoll_thread_data *) arg;
return NULL;
}
+static
void do_ppoll(int *fds, struct pollfd *ufds)
{
int i, ret;
}
}
+static
void stress_ppoll(int *fds, int value)
{
pthread_t writer;
*
* ppoll should work as expected and the trace should be readable at the end.
*/
+static
void ppoll_concurrent_write(void)
{
int i, ret, fds[MAX_FDS];
return;
}
+static
void *epoll_pwait_writer(void *addr)
{
srand(time(NULL));
* buffer allocated for the returned data. This should randomly segfault.
* The trace should be readable and no kernel OOPS should occur.
*/
+static
void epoll_pwait_concurrent_munmap(void)
{
int ret, epollfd, i, fds[MAX_FDS];
return;
}
-void usage(poptContext optCon, int exitcode, char *error, char *addl)
-{
- poptPrintUsage(optCon, stderr, 0);
- if (error) {
- fprintf(stderr, "%s: %s\n", error, addl);
- }
- exit(exitcode);
-}
-
+static
void print_list(void)
{
fprintf(stderr, "Test list (-t X):\n");
}
}
+static
int write_pipe(const char *path, uint8_t data)
{
int ret = 0;
return ret;
}
+static
int stop_consumer(const char **argv)
{
int ret = 0, i;
return ret;
}
+static
int resume_consumer(const char **argv)
{
int ret = 0, i;
return ret;
}
-int suspend_application()
+static
+int suspend_application(void)
{
int ret;
struct stat buf;
}
+static
int resume_application()
{
int ret;
}
+static
void test_triggers_buffer_usage_condition(const char *session_name,
const char *channel_name,
enum lttng_domain_type domain_type,
} while (ret != 0);
}
+static
void test_notification_channel(const char *session_name, const char *channel_name, const enum lttng_domain_type domain_type, const char **argv)
{
int ret = 0;
const char *session_name;
+static
bool schedules_equal(const struct lttng_rotation_schedule *a,
const struct lttng_rotation_schedule *b)
{
return equal;
}
+static
void test_add_null_session(void)
{
enum lttng_rotation_status status;
lttng_rotation_schedule_destroy(size_schedule);
}
+static
void test_add_null_schedule(void)
{
enum lttng_rotation_status status;
"NULL schedule rejected by lttng_session_add_rotation_schedule()");
}
+static
void test_add_uninitialized_schedule(void)
{
enum lttng_rotation_status status;
lttng_rotation_schedule_destroy(periodic_schedule);
}
+static
void test_remove_null_session(void)
{
enum lttng_rotation_status status;
lttng_rotation_schedule_destroy(size_schedule);
}
+static
void test_remove_null_schedule(void)
{
enum lttng_rotation_status status;
"NULL schedule rejected by lttng_session_remove_rotation_schedule()");
}
+static
void test_remove_uninitialized_schedule(void)
{
enum lttng_rotation_status status;
lttng_rotation_schedule_destroy(periodic_schedule);
}
+static
void test_uninitialized_schedule_get(void)
{
uint64_t value;
}
+static
void test_add_list_remove_schedule(
const struct lttng_rotation_schedule *original_schedule)
{
}
+static
void test_add_list_remove_size_schedule(void)
{
struct lttng_rotation_schedule *size_schedule;
lttng_rotation_schedule_destroy(size_schedule);
}
+static
void test_add_list_remove_periodic_schedule(void)
{
struct lttng_rotation_schedule *periodic_schedule;
return "Freeze time with 1KHz for regression test";
}
+void lttng_ust_clock_plugin_init(void);
void lttng_ust_clock_plugin_init(void)
{
int ret;
static long nprocessors;
+static
int plugin_getcpu(void)
{
/* Generate a sequence based on the number of configurated processor
return ret;
}
+void lttng_ust_getcpu_plugin_init(void);
void lttng_ust_getcpu_plugin_init(void)
{
int ret;
#define TRACEPOINT_DEFINE
#include "tp.h"
+static
void inthandler(int sig)
{
}
+static
int init_int_handler(void)
{
int result;
#define VALUE (-1)
#endif
-void call_tracepoint(void) {
+void call_tracepoint(void);
+void call_tracepoint(void)
+{
tracepoint(multi, tp, VALUE);
}
#include "callsites.h"
#endif
+void exec_callsite();
void exec_callsite()
{
#if HAS_CALLSITES
#endif
}
+static
void print_list(void)
{
fprintf(stderr, "Test list (-t X):\n");
fprintf(stderr, "\t2: simulate the upgrade of a library containing the callsites using dlopen() and dlclose(). \n");
}
+#if HAS_CALLSITES
+static
int dl_open_all(int nb_libraries, char **libraries)
{
int i, ret = 0;
* Takes 2 paths to libraries, dlopen() the first, trace, dlopen() the second,
* and dlclose the first to simulate the upgrade of a library.
*/
+static
int upgrade_lib(int nb_libraries, char **libraries)
{
int i, ret = 0;
error:
return ret;
}
+#endif /* HAS_CALLSITES */
+#if !HAS_CALLSITES
/*
* Simulate the upgrade of a library containing a callsite.
* Receives two libraries containing callsites for the same tracepoint.
*/
+static
int upgrade_callsite(int nb_libraries, char **libraries)
{
int ret = 0;
error:
return ret;
}
+#endif /* !HAS_CALLSITES */
int main(int argc, const char **argv)
{