From afb07a1f8b7520a3ab8a142c0c1ad84de79ca2c2 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Sun, 4 Oct 1998 13:27:51 +0000 Subject: [PATCH] More G_GNUC_UNUSED fun. --- examples/first.c | 2 +- examples/mountlist.c | 2 +- src/daemon/slave.c | 13 +++++++------ sysdeps/linux/close.c | 2 +- sysdeps/linux/cpu.c | 2 +- sysdeps/linux/open.c | 3 ++- sysdeps/linux/proctime.c | 2 +- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/examples/first.c b/examples/first.c index 0bc0a09e..19b95d39 100644 --- a/examples/first.c +++ b/examples/first.c @@ -38,7 +38,7 @@ #endif int -main (int argc, char *argv []) +main (int G_GNUC_UNUSED argc, char G_GNUC_UNUSED *argv []) { glibtop_union data; glibtop_sysdeps sysdeps; diff --git a/examples/mountlist.c b/examples/mountlist.c index af63afc7..0c5ce08e 100644 --- a/examples/mountlist.c +++ b/examples/mountlist.c @@ -36,7 +36,7 @@ #endif int -main (int argc, char *argv []) +main (int G_GNUC_UNUSED argc, char G_GNUC_UNUSED *argv []) { glibtop_fsusage fsusage; glibtop_mountlist mount_list; diff --git a/src/daemon/slave.c b/src/daemon/slave.c index 68a33b6a..51489fbb 100644 --- a/src/daemon/slave.c +++ b/src/daemon/slave.c @@ -24,13 +24,14 @@ void handle_slave_connection (int input, int output) { - glibtop *server = glibtop_global_server; + glibtop G_GNUC_UNUSED *server = glibtop_global_server; + int64_t G_GNUC_UNUSED *param_ptr; + void G_GNUC_UNUSED *ptr; + pid_t G_GNUC_UNUSED pid; + glibtop_response _resp, *resp = &_resp; glibtop_command _cmnd, *cmnd = &_cmnd; char parameter [BUFSIZ]; - int64_t *param_ptr; - void *ptr; - pid_t pid; glibtop_send_version (glibtop_global_server, output); @@ -97,10 +98,10 @@ handle_slave_connection (int input, int output) void handle_slave_command (glibtop_command *cmnd, glibtop_response *resp, - const void *parameter) + const void G_GNUC_UNUSED *parameter) { glibtop *server = glibtop_global_server; - pid_t pid; + pid_t G_GNUC_UNUSED pid; switch (cmnd->command) { case GLIBTOP_CMND_SYSDEPS: diff --git a/sysdeps/linux/close.c b/sysdeps/linux/close.c index 9506f275..160d6bfa 100644 --- a/sysdeps/linux/close.c +++ b/sysdeps/linux/close.c @@ -24,5 +24,5 @@ /* Closes pipe to gtop server. */ void -glibtop_close_s (glibtop *server) +glibtop_close_s (glibtop G_GNUC_UNUSED *server) { } diff --git a/sysdeps/linux/cpu.c b/sysdeps/linux/cpu.c index bd959d07..0217a187 100644 --- a/sysdeps/linux/cpu.c +++ b/sysdeps/linux/cpu.c @@ -53,7 +53,7 @@ void glibtop_get_cpu_s (glibtop *server, glibtop_cpu *buf) { char buffer [BUFSIZ], *p; - int fd, len, i; + int fd, len, G_GNUC_UNUSED i; glibtop_init_s (&server, GLIBTOP_SYSDEPS_CPU, 0); diff --git a/sysdeps/linux/open.c b/sysdeps/linux/open.c index 9c6e5e66..16bf6550 100644 --- a/sysdeps/linux/open.c +++ b/sysdeps/linux/open.c @@ -56,7 +56,8 @@ static void set_linux_version(void) { void glibtop_open_s (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) + const unsigned long G_GNUC_UNUSED features, + const unsigned G_GNUC_UNUSED flags) { #ifdef HAVE_LIBGTOP_SMP char buffer [BUFSIZ], *p; diff --git a/sysdeps/linux/proctime.c b/sysdeps/linux/proctime.c index 951e789d..425fd2fc 100644 --- a/sysdeps/linux/proctime.c +++ b/sysdeps/linux/proctime.c @@ -52,7 +52,7 @@ void glibtop_get_proc_time_s (glibtop *server, glibtop_proc_time *buf, pid_t pid) { char buffer [BUFSIZ], *p; - int i; + int G_GNUC_UNUSED i; glibtop_init_s (&server, GLIBTOP_SYSDEPS_PROC_TIME, 0);