summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-15 19:10:43 +0200
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-15 19:11:40 +0200
commitceb614aad46423170e284e66023c7a2e8c513338 (patch)
tree746601853c70c7d097ea4b97780d797d2daced21 /plugins
parentfff1014d1323980d5e969f31a5a17132482422ac (diff)
downloadmonitoring-plugins-ceb614aad46423170e284e66023c7a2e8c513338.tar.gz
fix compiler warnings for unused variables
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_curl.c14
-rw-r--r--plugins/check_ldap.c3
2 files changed, 12 insertions, 5 deletions
diff --git a/plugins/check_curl.c b/plugins/check_curl.c
index da578b55..153e492f 100644
--- a/plugins/check_curl.c
+++ b/plugins/check_curl.c
@@ -1218,6 +1218,10 @@ redir (curlhelp_write_curlbuf* header_buf)
1218 &status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen, 1218 &status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
1219 headers, &nof_headers, 0); 1219 headers, &nof_headers, 0);
1220 1220
1221 if (res == -1) {
1222 die (STATE_UNKNOWN, _("HTTP UNKNOWN - Failed to parse Response\n"));
1223 }
1224
1221 location = get_header_value (headers, nof_headers, "location"); 1225 location = get_header_value (headers, nof_headers, "location");
1222 1226
1223 if (verbose >= 2) 1227 if (verbose >= 2)
@@ -2388,6 +2392,10 @@ check_document_dates (const curlhelp_write_curlbuf *header_buf, char (*msg)[DEFA
2388 &status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen, 2392 &status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
2389 headers, &nof_headers, 0); 2393 headers, &nof_headers, 0);
2390 2394
2395 if (res == -1) {
2396 die (STATE_UNKNOWN, _("HTTP UNKNOWN - Failed to parse Response\n"));
2397 }
2398
2391 server_date = get_header_value (headers, nof_headers, "date"); 2399 server_date = get_header_value (headers, nof_headers, "date");
2392 document_date = get_header_value (headers, nof_headers, "last-modified"); 2400 document_date = get_header_value (headers, nof_headers, "last-modified");
2393 2401
@@ -2463,9 +2471,7 @@ check_document_dates (const curlhelp_write_curlbuf *header_buf, char (*msg)[DEFA
2463int 2471int
2464get_content_length (const curlhelp_write_curlbuf* header_buf, const curlhelp_write_curlbuf* body_buf) 2472get_content_length (const curlhelp_write_curlbuf* header_buf, const curlhelp_write_curlbuf* body_buf)
2465{ 2473{
2466 const char *s;
2467 int content_length = 0; 2474 int content_length = 0;
2468 char *copy;
2469 struct phr_header headers[255]; 2475 struct phr_header headers[255];
2470 size_t nof_headers = 255; 2476 size_t nof_headers = 255;
2471 size_t msglen; 2477 size_t msglen;
@@ -2476,6 +2482,10 @@ get_content_length (const curlhelp_write_curlbuf* header_buf, const curlhelp_wri
2476 &status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen, 2482 &status_line.http_major, &status_line.http_minor, &status_line.http_code, &status_line.msg, &msglen,
2477 headers, &nof_headers, 0); 2483 headers, &nof_headers, 0);
2478 2484
2485 if (res == -1) {
2486 die (STATE_UNKNOWN, _("HTTP UNKNOWN - Failed to parse Response\n"));
2487 }
2488
2479 content_length_s = get_header_value (headers, nof_headers, "content-length"); 2489 content_length_s = get_header_value (headers, nof_headers, "content-length");
2480 if (!content_length_s) { 2490 if (!content_length_s) {
2481 return header_buf->buflen + body_buf->buflen; 2491 return header_buf->buflen + body_buf->buflen;
diff --git a/plugins/check_ldap.c b/plugins/check_ldap.c
index a1bfe1be..15113b1f 100644
--- a/plugins/check_ldap.c
+++ b/plugins/check_ldap.c
@@ -97,9 +97,6 @@ main (int argc, char *argv[])
97 int tls; 97 int tls;
98 int version=3; 98 int version=3;
99 99
100 /* for entry counting */
101
102 LDAPMessage *next_entry;
103 int status_entries = STATE_OK; 100 int status_entries = STATE_OK;
104 int num_entries = 0; 101 int num_entries = 0;
105 102