Fixes for -Wimplicit-fallthrough

This commit is contained in:
RincewindsHat 2023-03-12 19:56:43 +01:00
parent 41fb615f3d
commit f7687d47cb
7 changed files with 7 additions and 0 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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;

View file

@ -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);