Re: [Nagios-devel] Warnings when compiling glib chained-hash

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Guest

Re: [Nagios-devel] Warnings when compiling glib chained-hash

Post by Guest »

Hi Noah

I also applied the patches on my box. I get exactly the same errors as
what u got.

The problem comes in when u try to get trends for a host. The graphs
doesn't display. Somebody on the list recommended to use the trends.cgi
and avail.cgi from a non patched nagios installation.

Thanks
Wickus Botha

On Thu, 2004-03-25 at 07:48, Noah Leaman wrote:
> I am getting these warnings when building nagios after apply the glib
> chained-hash patch:
>
> ../common/objects.c:123: warning: type mismatch with previous implicit
> declaration
> ../common/objects.c:104: warning: previous implicit declaration of
> `build_config_lists'
> ../common/objects.c:123: warning: `build_config_lists' was previously
> implicitly declared to return `int'
> ../common/objects.c: In function `build_config_lists':
> ../common/objects.c:124: warning: passing arg 2 of `g_tree_traverse'
> from incompatible pointer type
> ../common/objects.c: In function `add_service':
> ../common/objects.c:2222: warning: passing arg 1 of `g_tree_new' from
> incompatible pointer type
> ../common/statusdata.c:354: warning: type mismatch with previous
> implicit declaration
> ../common/statusdata.c:336: warning: previous implicit declaration of
> `build_lists'
> ../common/statusdata.c:354: warning: `build_lists' was previously
> implicitly declared to return `int'
> ../common/statusdata.c: In function `build_lists':
> ../common/statusdata.c:355: warning: passing arg 2 of `g_tree_traverse'
> from incompatible pointer type
>
> Nagios seems to be run find though but I am not sure what the warnings
> might mean later on. Here is the patch (same patch as an attachment if
> needed):
>
>
>
>
>
> diff -ur base/Makefile.in base/Makefile.in
> --- base/Makefile.in Sun Nov 10 22:52:13 2002
> +++ base/Makefile.in Mon Mar 15 18:13:37 2004
> @@ -10,9 +10,9 @@
> SRC_XDATA=../xdata
>
> CC=@CC@
> -CFLAGS=@CFLAGS@ @DEFS@ -DNSCORE
> +CFLAGS=@CFLAGS@ @DEFS@ -DNSCORE `glib-config --cflags`
> #CFLAGS=-O3 -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align
> -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
> -DHAVE_CONFIG_H -DNSCORE
> -LDFLAGS=@LDFLAGS@ @LIBS@
> +LDFLAGS=@LDFLAGS@ @LIBS@ `glib-config --libs`
>
> prefix=@prefix@
> exec_prefix=@exec_prefix@
> diff -ur cgi/Makefile.in cgi/Makefile.in
> --- cgi/Makefile.in Sun Aug 25 19:53:00 2002
> +++ cgi/Makefile.in Mon Mar 15 18:14:27 2004
> @@ -25,9 +25,9 @@
>
> CP=@CP@
> CC=@CC@
> -CFLAGS=@CFLAGS@ @DEFS@ -DNSCGI
> +CFLAGS=@CFLAGS@ @DEFS@ -DNSCGI `glib-config --cflags`
> #CFLAGS=-O3 -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align
> -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs
> -DHAVE_CONFIG_H -DNSCGI
> -LDFLAGS=@LDFLAGS@ @LIBS@
> +LDFLAGS=@LDFLAGS@ @LIBS@ `glib-config --libs`
>
> CGIS=avail.cgi cmd.cgi config.cgi extinfo.cgi history.cgi
> notifications.cgi outages.cgi showlog.cgi status.cgi statuswml.cgi
> summary.cgi tac.cgi $(CGIEXTRAS)
>
> diff -ur common/common.h common/common.h
> --- common/common.h Mon Feb 2 23:45:08 2004
> +++ common/common.h Mon Mar 15 18:14:44 2004
> @@ -208,8 +208,12 @@
> #define OK 0
> #define ERROR -2 /* value was changed
> from -1 so as to not interfere with STATUS_UNKNOWN plugin result */
>
> +#ifndef TRUE
> #define TRUE 1
> +#endif
> +#ifndef FALSE
> #define FALSE 0
> +#endif
>
>
> /****************** HOST CONFIG FILE READING OPTIONS
> ********************/
> diff -ur common/config.h.in common/config.h.in
> --- common/config.h.in Sat Apr 20 16:34:02 2002
> +++ common/config.h.in Mon Mar 15 18:15:01 2004
> @@ -214,3 +214,7 @@
> #include
> #endif
>
> +#define HAVE_GLIB_H 1
> +#ifdef HAVE_GLIB_H
> +#include
> +#endif
> diff -ur common/objects.c common/objects.c
> --- common/objects.c Sat Nov 22 20:37:22 2003
> +++ common/objects.c Mon Mar 15 18:22:18 2004
> @@ -59,6 +59,8 @@
> servicedependency *servicedependency_list=NULL;
> hostdependency *hostdependency_list=NU

...[email truncated]...


This post was automatically imported from historical nagios-devel mailing list archives
Original poster: wickus.botha@za.tiscali.com