core: Bail out when we fail to read the resource file

It should be a fatal error, so let's make it so.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2711 5f96b256-904b-4d8d-8c98-d829582c6739
cgi/cmd.c: add explicit type for function parameter

Defaulting to int generates warnings. Setting it explicitly is fine.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2712 5f96b256-904b-4d8d-8c98-d829582c6739
Janit patch: Remove redundant declarations

gcc -Wredundant-decls reports a bunch. This gets rid of them,
making the code a bit more maintainable.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2713 5f96b256-904b-4d8d-8c98-d829582c6739
core: Remove debug printf() statement

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2714 5f96b256-904b-4d8d-8c98-d829582c6739
Don't use declarations after statements

It causes compilers that only support C90 to bail out hard and makes
gcc pretty noisy when extra warnings are enabled, so let's avoid it.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2715 5f96b256-904b-4d8d-8c98-d829582c6739
Fix -Wmissing-prototypes warnings

We do this by defining the offending functions as static, thus
removing them from the global scope. This lets the compiler
optimize better, so it's not just about making gcc shut up.

Signed-off-by: Andreas Ericsson <ae@op5.se>

git-svn-id: https://nagios.svn.sourceforge.net/svnroot/nagios/nagioscore/trunk@2716 5f96b256-904b-4d8d-8c98-d829582c6739