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>
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>
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>
core: Remove debug printf() statement

Signed-off-by: Andreas Ericsson <ae@op5.se>
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>
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>