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 diff --git a/plugins/check_curl.c b/plugins/check_curl.c index be5740d..b713714 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 ced13d0..d73efbb 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 6f5656e..23a9e99 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 c4b4417..c34bb08 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 8c03bc8..432a984 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 eaa7eeb..b035aab 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 c425df3..04dc6c6 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 v0.10-9-g596f