From 6e4f80b8e2da76006a839487f9bcb184ca35b160 Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Wed, 22 Nov 2000 21:26:15 +0000 Subject: [PATCH] Added -Werror. 2000-11-22 Martin Baulig * configure.in (INCLUDES): Added -Werror. * include/glibtop/open.h (_glibtop_open_sysdeps): The first argument is now a `glibtop_client *', removed the `flags' argument and added `const char **backend_args' and `GError **opt_error'. --- ChangeLog | 6 ++++++ configure.in | 2 +- include/glibtop/open.h | 5 +++-- lib/Makefile.am | 3 ++- lib/glibtop-client.c | 2 +- lib/sysdeps-init-freebsd.c | 13 +++++++------ lib/sysdeps-init-kernel.c | 17 +++++++++-------- lib/sysdeps-init-linux.c | 13 +++++++------ lib/sysdeps-init-osf1.c | 17 +++++++++-------- lib/sysdeps-init-solaris.c | 17 +++++++++-------- lib/sysdeps-init-stub-suid.c | 13 +++++++------ lib/sysdeps-init-stub.c | 13 +++++++------ 12 files changed, 68 insertions(+), 53 deletions(-) diff --git a/ChangeLog b/ChangeLog index 909e7bcc..a8b84c5c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2000-11-22 Martin Baulig + * configure.in (INCLUDES): Added -Werror. + + * include/glibtop/open.h (_glibtop_open_sysdeps): The first + argument is now a `glibtop_client *', removed the `flags' argument + and added `const char **backend_args' and `GError **opt_error'. + * include/glibtop/backends.h (glibtop_open_backend_l): Allow the `error' argument to be NULL; propagate the error to the glibtop_client in this case. diff --git a/configure.in b/configure.in index c69f4e3c..50c1a67e 100644 --- a/configure.in +++ b/configure.in @@ -328,7 +328,7 @@ AC_SUBST(machine_incs) LIBGTOP_BACKEND_DIR="\$(datadir)/libgtop/backends" -INCLUDES="-D_IN_LIBGTOP -D_GNU_SOURCE -DGLIBTOP_NAMES -I\$(top_builddir) -I\$(top_srcdir) -I\$(top_srcdir)/sysdeps/$sysdeps_dir -I\$(top_srcdir)/include -I\$(top_builddir)/include -I\$(top_srcdir)/intl $GNOMESUPPORT_CFLAGS $GLIB_CFLAGS $XML_CFLAGS $CFLAGS $X_CFLAGS "'-DGTOPLOCALEDIR=\"$(datadir)/locale\" -DLIBGTOP_VERSION=\"'"$LIBGTOP_VERSION"'\" -DLIBGTOP_SERVER_VERSION=\"'"$LIBGTOP_SERVER_VERSION"'\" -DLIBGTOP_VERSION_CODE='$LIBGTOP_VERSION_CODE' -DLIBGTOP_SERVER=\"'"$LIBGTOP_SERVER"'\" -DLIBGTOP_BACKEND_DIR=\"'"$LIBGTOP_BACKEND_DIR"'\"' +INCLUDES="-D_IN_LIBGTOP -D_GNU_SOURCE -DGLIBTOP_NAMES -Werror -I\$(top_builddir) -I\$(top_srcdir) -I\$(top_srcdir)/sysdeps/$sysdeps_dir -I\$(top_srcdir)/include -I\$(top_builddir)/include -I\$(top_srcdir)/intl $GNOMESUPPORT_CFLAGS $GLIB_CFLAGS $XML_CFLAGS $CFLAGS $X_CFLAGS "'-DGTOPLOCALEDIR=\"$(datadir)/locale\" -DLIBGTOP_VERSION=\"'"$LIBGTOP_VERSION"'\" -DLIBGTOP_SERVER_VERSION=\"'"$LIBGTOP_SERVER_VERSION"'\" -DLIBGTOP_VERSION_CODE='$LIBGTOP_VERSION_CODE' -DLIBGTOP_SERVER=\"'"$LIBGTOP_SERVER"'\" -DLIBGTOP_BACKEND_DIR=\"'"$LIBGTOP_BACKEND_DIR"'\"' AC_SUBST(INCLUDES) diff --git a/include/glibtop/open.h b/include/glibtop/open.h index 19623c30..360b884f 100644 --- a/include/glibtop/open.h +++ b/include/glibtop/open.h @@ -70,8 +70,9 @@ glibtop_open_s (glibtop_server *server, const char *program_name, #ifdef _IN_LIBGTOP void -_glibtop_open_sysdeps (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags); +_glibtop_open_sysdeps (glibtop_client *client, const char *program_name, + const u_int64_t features, const char **backend_args, + GError **opt_error); #endif /* _IN_LIBGTOP */ diff --git a/lib/Makefile.am b/lib/Makefile.am index 767d7806..5202ce6b 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -10,7 +10,8 @@ noinst_LTLIBRARIES = libgtop_server.la libgtop_la_SOURCES = errors.c backend.c \ init-backends.c open-backend.c \ - glibtop-client.c glibtop-server.c + glibtop-client.c glibtop-server.c \ + sysdeps-init.c libgtop_server_la_SOURCES = error.c xmalloc.c diff --git a/lib/glibtop-client.c b/lib/glibtop-client.c index 4ebe6761..2d827193 100644 --- a/lib/glibtop-client.c +++ b/lib/glibtop-client.c @@ -99,7 +99,7 @@ glibtop_client_warning_handler (glibtop_client *client, GError *error) } -void +static void glibtop_client_marshal_VOID__POINTER (GClosure *closure, GValue *return_value, guint n_param_values, diff --git a/lib/sysdeps-init-freebsd.c b/lib/sysdeps-init-freebsd.c index b552f2ee..f390542a 100644 --- a/lib/sysdeps-init-freebsd.c +++ b/lib/sysdeps-init-freebsd.c @@ -65,11 +65,12 @@ const glibtop_signame glibtop_sys_siglist [] = }; void -_glibtop_open_sysdeps (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) +_glibtop_open_sysdeps (glibtop_client *client, const char *program_name, + const u_int64_t features, const char **backend_args, + GError **opt_error) { - glibtop_open_backend_l (server, "glibtop-backend-common", - features, NULL); - glibtop_open_backend_l (server, "glibtop-backend-server", - features, NULL); + glibtop_open_backend_l (client, "glibtop-backend-common", + features, backend_args, opt_error); + glibtop_open_backend_l (client, "glibtop-backend-server", + features, backend_args, opt_error); } diff --git a/lib/sysdeps-init-kernel.c b/lib/sysdeps-init-kernel.c index aba1bd25..8697218b 100644 --- a/lib/sysdeps-init-kernel.c +++ b/lib/sysdeps-init-kernel.c @@ -65,13 +65,14 @@ const glibtop_signame glibtop_sys_siglist [] = }; void -_glibtop_open_sysdeps (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) +_glibtop_open_sysdeps (glibtop_client *client, const char *program_name, + const u_int64_t features, const char **backend_args, + GError **opt_error) { - glibtop_open_backend_l (server, "glibtop-backend-kernel", - features, NULL); - glibtop_open_backend_l (server, "glibtop-backend-common", - features, NULL); - glibtop_open_backend_l (server, "glibtop-backend-sysdeps", - features, NULL); + glibtop_open_backend_l (client, "glibtop-backend-kernel", + features, backend_args, opt_error); + glibtop_open_backend_l (client, "glibtop-backend-common", + features, backend_args, opt_error); + glibtop_open_backend_l (client, "glibtop-backend-sysdeps", + features, backend_args, opt_error); } diff --git a/lib/sysdeps-init-linux.c b/lib/sysdeps-init-linux.c index 6b34264b..654ade2d 100644 --- a/lib/sysdeps-init-linux.c +++ b/lib/sysdeps-init-linux.c @@ -65,11 +65,12 @@ const glibtop_signame glibtop_sys_siglist [] = }; void -_glibtop_open_sysdeps (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) +_glibtop_open_sysdeps (glibtop_client *client, const char *program_name, + const u_int64_t features, const char **backend_args, + GError **opt_error) { - glibtop_open_backend_l (server, "glibtop-backend-common", - features, NULL); - glibtop_open_backend_l (server, "glibtop-backend-sysdeps", - features, NULL); + glibtop_open_backend_l (client, "glibtop-backend-common", + features, backend_args, opt_error); + glibtop_open_backend_l (client, "glibtop-backend-sysdeps", + features, backend_args, opt_error); } diff --git a/lib/sysdeps-init-osf1.c b/lib/sysdeps-init-osf1.c index 3ad6da8e..436f78c8 100644 --- a/lib/sysdeps-init-osf1.c +++ b/lib/sysdeps-init-osf1.c @@ -33,13 +33,14 @@ const glibtop_signame glibtop_sys_siglist [] = { { 0, NULL, NULL } }; void -_glibtop_open_sysdeps (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) +_glibtop_open_sysdeps (glibtop_client *client, const char *program_name, + const u_int64_t features, const char **backend_args, + GError **opt_error) { - glibtop_open_backend_l (server, "glibtop-backend-common", - features, NULL); - glibtop_open_backend_l (server, "glibtop-backend-sysdeps", - features, NULL); - glibtop_open_backend_l (server, "glibtop-backend-server", - features, NULL); + glibtop_open_backend_l (client, "glibtop-backend-common", + features, backend_args, opt_error); + glibtop_open_backend_l (client, "glibtop-backend-sysdeps", + features, backend_args, opt_error); + glibtop_open_backend_l (client, "glibtop-backend-server", + features, backend_args, opt_error); } diff --git a/lib/sysdeps-init-solaris.c b/lib/sysdeps-init-solaris.c index 3ad6da8e..436f78c8 100644 --- a/lib/sysdeps-init-solaris.c +++ b/lib/sysdeps-init-solaris.c @@ -33,13 +33,14 @@ const glibtop_signame glibtop_sys_siglist [] = { { 0, NULL, NULL } }; void -_glibtop_open_sysdeps (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) +_glibtop_open_sysdeps (glibtop_client *client, const char *program_name, + const u_int64_t features, const char **backend_args, + GError **opt_error) { - glibtop_open_backend_l (server, "glibtop-backend-common", - features, NULL); - glibtop_open_backend_l (server, "glibtop-backend-sysdeps", - features, NULL); - glibtop_open_backend_l (server, "glibtop-backend-server", - features, NULL); + glibtop_open_backend_l (client, "glibtop-backend-common", + features, backend_args, opt_error); + glibtop_open_backend_l (client, "glibtop-backend-sysdeps", + features, backend_args, opt_error); + glibtop_open_backend_l (client, "glibtop-backend-server", + features, backend_args, opt_error); } diff --git a/lib/sysdeps-init-stub-suid.c b/lib/sysdeps-init-stub-suid.c index a16e2216..786b7e6f 100644 --- a/lib/sysdeps-init-stub-suid.c +++ b/lib/sysdeps-init-stub-suid.c @@ -33,11 +33,12 @@ const glibtop_signame glibtop_sys_siglist [] = { { 0, NULL, NULL } }; void -_glibtop_open_sysdeps (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) +_glibtop_open_sysdeps (glibtop_client *client, const char *program_name, + const u_int64_t features, const char **backend_args, + GError **opt_error) { - glibtop_open_backend_l (server, "glibtop-backend-common", - features, NULL); - glibtop_open_backend_l (server, "glibtop-backend-server", - features, NULL); + glibtop_open_backend_l (client, "glibtop-backend-common", + features, backend_args, opt_error); + glibtop_open_backend_l (client, "glibtop-backend-server", + features, backend_args, opt_error); } diff --git a/lib/sysdeps-init-stub.c b/lib/sysdeps-init-stub.c index 3e6879ad..3b5b5c04 100644 --- a/lib/sysdeps-init-stub.c +++ b/lib/sysdeps-init-stub.c @@ -33,11 +33,12 @@ const glibtop_signame glibtop_sys_siglist [] = { { 0, NULL, NULL } }; void -_glibtop_open_sysdeps (glibtop *server, const char *program_name, - const unsigned long features, const unsigned flags) +_glibtop_open_sysdeps (glibtop_client *client, const char *program_name, + const u_int64_t features, const char **backend_args, + GError **opt_error) { - glibtop_open_backend_l (server, "glibtop-backend-common", - features, NULL); - glibtop_open_backend_l (server, "glibtop-backend-sysdeps", - features, NULL); + glibtop_open_backend_l (client, "glibtop-backend-common", + features, backend_args, opt_error); + glibtop_open_backend_l (client, "glibtop-backend-sysdeps", + features, backend_args, opt_error); }