From f7687d47cb0841d0bc12ef205fcbaef8bf2e3805 Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Sun, 12 Mar 2023 19:56:43 +0100 Subject: Fixes for -Wimplicit-fallthrough --- plugins/check_curl.c | 1 + plugins/check_dbi.c | 1 + plugins/check_fping.c | 1 + plugins/check_hpjd.c | 1 + plugins/check_http.c | 1 + plugins/check_smtp.c | 1 + plugins/check_snmp.c | 1 + 7 files changed, 7 insertions(+) diff --git a/plugins/check_curl.c b/plugins/check_curl.c index be5740d7..b7137145 100644 --- a/plugins/check_curl.c +++ b/plugins/check_curl.c @@ -1654,6 +1654,7 @@ process_arguments (int argc, char **argv) break; case 'R': /* regex */ cflags |= REG_ICASE; + // fall through case 'r': /* regex */ strncpy (regexp, optarg, MAX_RE_SIZE - 1); regexp[MAX_RE_SIZE - 1] = 0; diff --git a/plugins/check_dbi.c b/plugins/check_dbi.c index ced13d05..d73efbb2 100644 --- a/plugins/check_dbi.c +++ b/plugins/check_dbi.c @@ -426,6 +426,7 @@ process_arguments (int argc, char **argv) else timeout_interval = atoi (optarg); + break; case 'H': /* host */ if (!is_host (optarg)) usage2 (_("Invalid hostname/address"), optarg); diff --git a/plugins/check_fping.c b/plugins/check_fping.c index 6f5656ef..23a9e990 100644 --- a/plugins/check_fping.c +++ b/plugins/check_fping.c @@ -354,6 +354,7 @@ process_arguments (int argc, char **argv) break; case 'I': /* sourceip */ sourceif = strscpy (sourceif, optarg); + break; case '4': /* IPv4 only */ address_family = AF_INET; break; diff --git a/plugins/check_hpjd.c b/plugins/check_hpjd.c index c4b44178..c34bb082 100644 --- a/plugins/check_hpjd.c +++ b/plugins/check_hpjd.c @@ -353,6 +353,7 @@ process_arguments (int argc, char **argv) usage2 (_("Port must be a positive short integer"), optarg); else port = atoi(optarg); + break; case 'D': /* disable paper out check*/ check_paper_out = 0; break; diff --git a/plugins/check_http.c b/plugins/check_http.c index 8c03bc8b..432a984b 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -498,6 +498,7 @@ bool process_arguments (int argc, char **argv) break; case 'R': /* regex */ cflags |= REG_ICASE; + // fall through case 'r': /* regex */ strncpy (regexp, optarg, MAX_RE_SIZE - 1); regexp[MAX_RE_SIZE - 1] = 0; diff --git a/plugins/check_smtp.c b/plugins/check_smtp.c index eaa7eeba..b035aab5 100644 --- a/plugins/check_smtp.c +++ b/plugins/check_smtp.c @@ -616,6 +616,7 @@ process_arguments (int argc, char **argv) #else usage (_("SSL support not available - install OpenSSL and recompile")); #endif + // fall through case 'S': /* starttls */ use_ssl = TRUE; diff --git a/plugins/check_snmp.c b/plugins/check_snmp.c index c425df3c..04dc6c6f 100644 --- a/plugins/check_snmp.c +++ b/plugins/check_snmp.c @@ -855,6 +855,7 @@ process_arguments (int argc, char **argv) break; case 'R': /* regex */ cflags = REG_ICASE; + // fall through case 'r': /* regex */ cflags |= REG_EXTENDED | REG_NOSUB | REG_NEWLINE; strncpy (regex_expect, optarg, sizeof (regex_expect) - 1); -- cgit v1.2.3-74-g34f1