summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2023-11-22 22:34:59 (GMT)
committerGitHub <noreply@github.com>2023-11-22 22:34:59 (GMT)
commit53a15f0c2c59a06f2d4f8f07c6b579b7d5272de3 (patch)
tree5e2e7e5f0103298390cecd1f867fd4da7caa7d47 /plugins
parentf1e91405c3b51641b02228672c47e2b4aa1dd5f1 (diff)
parent7ba8463506b3d246c246a0caa0d78f0d16b321c6 (diff)
downloadmonitoring-plugins-53a15f0c2c59a06f2d4f8f07c6b579b7d5272de3.tar.gz
Merge pull request #1951 from RincewindsHat/compiler_warnings_maybe_unused
Fix compiler warning for uninitialized variable
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_curl.c2
-rw-r--r--plugins/check_dbi.c2
-rw-r--r--plugins/check_ntp_peer.c3
3 files changed, 4 insertions, 3 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index 9c0dc34..8f9a21d 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -395,7 +395,7 @@ lookup_host (const char *host, char *buf, size_t buflen)
395 char addrstr[100]; 395 char addrstr[100];
396 size_t addrstr_len; 396 size_t addrstr_len;
397 int errcode; 397 int errcode;
398 void *ptr; 398 void *ptr = { 0 };
399 size_t buflen_remaining = buflen - 1; 399 size_t buflen_remaining = buflen - 1;
400 400
401 memset (&hints, 0, sizeof (hints)); 401 memset (&hints, 0, sizeof (hints));
diff --git a/plugins/check_dbi.c b/plugins/check_dbi.c
index c24ca24..29c8520 100644
--- a/plugins/check_dbi.c
+++ b/plugins/check_dbi.c
@@ -141,7 +141,7 @@ main (int argc, char **argv)
141 if (verbose > 2) 141 if (verbose > 2)
142 printf ("Initializing DBI\n"); 142 printf ("Initializing DBI\n");
143 143
144 dbi_inst *instance_p; 144 dbi_inst *instance_p = { 0 };
145 145
146 if (dbi_initialize_r(NULL, instance_p) < 0) { 146 if (dbi_initialize_r(NULL, instance_p) < 0) {
147 printf ("UNKNOWN - failed to initialize DBI; possibly you don't have any drivers installed.\n"); 147 printf ("UNKNOWN - failed to initialize DBI; possibly you don't have any drivers installed.\n");
diff --git a/plugins/check_ntp_peer.c b/plugins/check_ntp_peer.c
index d4e5fd9..4fb9018 100644
--- a/plugins/check_ntp_peer.c
+++ b/plugins/check_ntp_peer.c
@@ -557,7 +557,8 @@ char *perfd_truechimers (int num_truechimers)
557} 557}
558 558
559int main(int argc, char *argv[]){ 559int main(int argc, char *argv[]){
560 int result, offset_result, stratum, num_truechimers, oresult, jresult, sresult, tresult; 560 int result, offset_result, stratum, num_truechimers;
561 int oresult, jresult, sresult, tresult = STATE_UNKNOWN;
561 double offset=0, jitter=0; 562 double offset=0, jitter=0;
562 char *result_line, *perfdata_line; 563 char *result_line, *perfdata_line;
563 564