diff --git a/ChangeLog b/ChangeLog index 06ab344f..aa22092e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 1999-07-29 Martin Baulig + * include/glibtop/error.h: Use G_GNUC_UNUSED. + * configure.in (ENABLE_STATIC, ENABLE_SHARED): New automake conditionals. diff --git a/include/glibtop/error.h b/include/glibtop/error.h index 2b7c835b..a168aee9 100644 --- a/include/glibtop/error.h +++ b/include/glibtop/error.h @@ -30,13 +30,22 @@ BEGIN_LIBGTOP_DECLS +#ifndef G_GNUC_UNUSED +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4) +#define G_GNUC_UNUSED \ + __attribute__((unused)) +#else /* !__GNUC__ */ +#define G_GNUC_UNUSED +#endif /* !__GNUC__ */ +#endif /* defined G_GNUC_UNUSED */ + void glibtop_error_vr (glibtop *server, char *format, va_list args); void glibtop_warn_vr (glibtop *server, char *format, va_list args); void glibtop_error_io_vr (glibtop *server, char *format, int, va_list args); void glibtop_warn_io_vr (glibtop *server, char *format, int, va_list args); -static void +static void G_GNUC_UNUSED glibtop_error_r (glibtop *server, char *format, ...) { va_list args; @@ -46,7 +55,7 @@ glibtop_error_r (glibtop *server, char *format, ...) va_end (args); } -static void +static void G_GNUC_UNUSED glibtop_warn_r (glibtop *server, char *format, ...) { va_list args; @@ -56,7 +65,7 @@ glibtop_warn_r (glibtop *server, char *format, ...) va_end (args); } -static void +static void G_GNUC_UNUSED glibtop_error_io_r (glibtop *server, char *format, ...) { va_list args; @@ -66,7 +75,7 @@ glibtop_error_io_r (glibtop *server, char *format, ...) va_end (args); } -static void +static void G_GNUC_UNUSED glibtop_warn_io_r (glibtop *server, char *format, ...) { va_list args;