aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-09-10 22:29:46 +0200
committerGravatar Holger Weiss <holger@zedat.fu-berlin.de> 2013-09-10 22:29:46 +0200
commitb48cb1f130cda9818d06aaf74cdc7d2aef13bf42 (patch)
treeb53080fe5cf9b8ae1021dc226738afac973a5819
parentd4a781817cbe1c6168e0687aea968b7a6f348abe (diff)
downloadmonitoring-plugins-b48cb1f130cda9818d06aaf74cdc7d2aef13bf42.tar.gz
Fix GCC's -Wimplicit-function-declaration warnings
Fix the issues found by GCC when the -Wimplicit-function-declaration flag is specified.
-rw-r--r--lib/utils_base.c3
-rw-r--r--plugins/check_ide_smart.c10
-rw-r--r--plugins/check_tcp.c2
-rw-r--r--plugins/negate.c3
-rw-r--r--plugins/runcmd.h12
5 files changed, 17 insertions, 13 deletions
diff --git a/lib/utils_base.c b/lib/utils_base.c
index 8685e6fe..54463e92 100644
--- a/lib/utils_base.c
+++ b/lib/utils_base.c
@@ -27,6 +27,7 @@
#include "common.h"
#include <stdarg.h>
#include "utils_base.h"
+#include <ctype.h>
#include <fcntl.h>
#include <sys/stat.h>
@@ -34,6 +35,8 @@
nagios_plugin *this_nagios_plugin=NULL;
+int _np_state_read_file(FILE *);
+
void np_init( char *plugin_name, int argc, char **argv ) {
if (this_nagios_plugin==NULL) {
this_nagios_plugin = calloc(1, sizeof(nagios_plugin));
diff --git a/plugins/check_ide_smart.c b/plugins/check_ide_smart.c
index ee6bf7bd..0a8009ab 100644
--- a/plugins/check_ide_smart.c
+++ b/plugins/check_ide_smart.c
@@ -164,8 +164,14 @@ enum SmartCommand
SMART_CMD_AUTO_OFFLINE
};
-void print_values (values_t * p, thresholds_t * t);
-int smart_cmd_simple (int fd, enum SmartCommand command, __u8 val0, char show_error);
+char *get_offline_text (int);
+int smart_read_values (int, values_t *);
+int values_not_passed (values_t *, thresholds_t *);
+int nagios (values_t *, thresholds_t *);
+void print_value (value_t *, threshold_t *);
+void print_values (values_t *, thresholds_t *);
+int smart_cmd_simple (int, enum SmartCommand, __u8, char);
+int smart_read_thresholds (int, thresholds_t *);
int
main (int argc, char *argv[])
diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c
index b024821e..9e62638b 100644
--- a/plugins/check_tcp.c
+++ b/plugins/check_tcp.c
@@ -32,6 +32,8 @@ char *progname;
const char *copyright = "1999-2008";
const char *email = "nagiosplug-devel@lists.sourceforge.net";
+#include <ctype.h>
+
#include "common.h"
#include "netutils.h"
#include "utils.h"
diff --git a/plugins/negate.c b/plugins/negate.c
index 493988ee..ef7d4e03 100644
--- a/plugins/negate.c
+++ b/plugins/negate.c
@@ -35,6 +35,8 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
#define DEFAULT_TIMEOUT 11
+#include <ctype.h>
+
#include "common.h"
#include "utils.h"
#include "utils_cmd.h"
@@ -43,6 +45,7 @@ const char *email = "nagiosplug-devel@lists.sourceforge.net";
static const char **process_arguments (int, char **);
int validate_arguments (char **);
+int translate_state (char *);
void print_help (void);
void print_usage (void);
int subst_text = FALSE;
diff --git a/plugins/runcmd.h b/plugins/runcmd.h
index 5957562b..fe660673 100644
--- a/plugins/runcmd.h
+++ b/plugins/runcmd.h
@@ -25,17 +25,7 @@
#define NAGIOSPLUG_RUNCMD_H
#include "common.h"
-
-/** types **/
-struct output {
- char *buf; /* output buffer */
- size_t buflen; /* output buffer content length */
- char **line; /* array of lines (points to buf) */
- size_t *lens; /* string lengths */
- size_t lines; /* lines of output */
-};
-
-typedef struct output output;
+#include "utils_cmd.h" /* for the "output" type */
/** prototypes **/
int np_runcmd(const char *, output *, output *, int);