summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2013-09-10 18:52:13 (GMT)
committerHolger Weiss <holger@zedat.fu-berlin.de>2013-09-10 18:52:13 (GMT)
commitd4a781817cbe1c6168e0687aea968b7a6f348abe (patch)
tree7981bfe79edf66d9e296b28e90323d04f7287a48
parentcfb50add532c1b5c80ea8214340b0a908a7fab65 (diff)
downloadmonitoring-plugins-d4a781817cbe1c6168e0687aea968b7a6f348abe.tar.gz
Fix GCC's -Wuninitialized warnings
Fix the issues found by GCC when the -Wuninitialized flag is specified.
-rw-r--r--lib/tests/test_disk.c2
-rw-r--r--plugins/check_http.c24
-rw-r--r--plugins/check_procs.c2
3 files changed, 14 insertions, 14 deletions
diff --git a/lib/tests/test_disk.c b/lib/tests/test_disk.c
index 58eb8f1..f6477ac 100644
--- a/lib/tests/test_disk.c
+++ b/lib/tests/test_disk.c
@@ -34,7 +34,7 @@ main (int argc, char **argv)
34 struct name_list *dummy_mountlist = NULL; 34 struct name_list *dummy_mountlist = NULL;
35 struct name_list *temp_name; 35 struct name_list *temp_name;
36 struct parameter_list *paths = NULL; 36 struct parameter_list *paths = NULL;
37 struct parameter_list *p, *prev, *last; 37 struct parameter_list *p, *prev = NULL, *last = NULL;
38 38
39 struct mount_entry *dummy_mount_list; 39 struct mount_entry *dummy_mount_list;
40 struct mount_entry *me; 40 struct mount_entry *me;
diff --git a/plugins/check_http.c b/plugins/check_http.c
index c44bb3a..ecd832f 100644
--- a/plugins/check_http.c
+++ b/plugins/check_http.c
@@ -855,18 +855,18 @@ check_http (void)
855 char *full_page_new; 855 char *full_page_new;
856 char *buf; 856 char *buf;
857 char *pos; 857 char *pos;
858 long microsec; 858 long microsec = 0L;
859 double elapsed_time; 859 double elapsed_time = 0.0;
860 long microsec_connect; 860 long microsec_connect = 0L;
861 double elapsed_time_connect; 861 double elapsed_time_connect = 0.0;
862 long microsec_ssl; 862 long microsec_ssl = 0L;
863 double elapsed_time_ssl; 863 double elapsed_time_ssl = 0.0;
864 long microsec_firstbyte; 864 long microsec_firstbyte = 0L;
865 double elapsed_time_firstbyte; 865 double elapsed_time_firstbyte = 0.0;
866 long microsec_headers; 866 long microsec_headers = 0L;
867 double elapsed_time_headers; 867 double elapsed_time_headers = 0.0;
868 long microsec_transfer; 868 long microsec_transfer = 0L;
869 double elapsed_time_transfer; 869 double elapsed_time_transfer = 0.0;
870 int page_len = 0; 870 int page_len = 0;
871 int result = STATE_OK; 871 int result = STATE_OK;
872 872
diff --git a/plugins/check_procs.c b/plugins/check_procs.c
index d09bd8b..d20b027 100644
--- a/plugins/check_procs.c
+++ b/plugins/check_procs.c
@@ -150,7 +150,7 @@ main (int argc, char **argv)
150 int crit = 0; /* number of processes in crit state */ 150 int crit = 0; /* number of processes in crit state */
151 int i = 0, j = 0; 151 int i = 0, j = 0;
152 int result = STATE_UNKNOWN; 152 int result = STATE_UNKNOWN;
153 int ret; 153 int ret = 0;
154 output chld_out, chld_err; 154 output chld_out, chld_err;
155 155
156 setlocale (LC_ALL, ""); 156 setlocale (LC_ALL, "");