'/* fallthrough */' hits implicit-fallthrough error with GCC 11.
This patch replaces the existing '/* fallthrough */' comments and
its variants with the 'fallthrough' pseudo keyword, which was added
by Linux kernel commit v5.4-rc2-141-g294f69e662d1.
Test-Parameters: trivial
Change-Id: Icace4c9953950f86d3c48068d8c6bba7dd1160a7
Signed-off-by: Jian Yu <yujian@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/46270
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Peter Jones <pjones@whamcloud.com>
#define LOV_PATTERN_DEFAULT 0xffffffff
#endif
#define LOV_PATTERN_DEFAULT 0xffffffff
#endif
+#ifndef fallthrough
+#define fallthrough do {} while (0) /* fallthrough */
+#endif
+
typedef struct statx lstatx_t;
#define lustre_fid struct lu_fid
typedef struct statx lstatx_t;
#define lustre_fid struct lu_fid
#include <stdlib.h>
#include "write_bytes.h"
#include <stdlib.h>
#include "write_bytes.h"
+#ifndef fallthrough
+#define fallthrough do {} while (0) /* fallthrough */
+#endif
+
extern char *this_realm;
extern gss_cred_id_t gssd_creds;
extern char *this_realm;
extern gss_cred_id_t gssd_creds;
cred->cr_uid = 0;
cred->cr_usr_oss = 1;
}
cred->cr_uid = 0;
cred->cr_usr_oss = 1;
}
case LUSTRE_GSS_SVC_OSS:
if (!strcmp(sname, LUSTRE_ROOT_NAME)) {
cred->cr_uid = 0;
case LUSTRE_GSS_SVC_OSS:
if (!strcmp(sname, LUSTRE_ROOT_NAME)) {
cred->cr_uid = 0;
goto usage_error;
}
lsa.lsa_pattern = LLAPI_LAYOUT_OVERSTRIPING;
goto usage_error;
}
lsa.lsa_pattern = LLAPI_LAYOUT_OVERSTRIPING;
case 'c':
errno = 0;
lsa.lsa_stripe_count = strtoul(optarg, &end, 0);
case 'c':
errno = 0;
lsa.lsa_stripe_count = strtoul(optarg, &end, 0);
switch (*endptr) {
case 'y':
unit *= 52; /* 52 weeks + 1 day below */
switch (*endptr) {
case 'y':
unit *= 52; /* 52 weeks + 1 day below */
- case 'w': /* fallthrough */
+ fallthrough;
+ case 'w':
unit *= 7;
if (param->fp_time_margin == FP_DEFAULT_TIME_MARGIN)
param->fp_time_margin *= (1 + unit / 52);
unit += (*endptr == 'y'); /* +1 day for 365 days/year */
unit *= 7;
if (param->fp_time_margin == FP_DEFAULT_TIME_MARGIN)
param->fp_time_margin *= (1 + unit / 52);
unit += (*endptr == 'y'); /* +1 day for 365 days/year */
case '\0': /* days are default unit if none used */
case '\0': /* days are default unit if none used */
- case 'd': /* fallthrough */
+ fallthrough;
+ case 'd':
- case 'h': /* fallthrough */
+ fallthrough;
+ case 'h':
- case 'm': /* fallthrough */
+ fallthrough;
+ case 'm':
- case 's': /* fallthrough */
+ fallthrough;
+ case 's':
break;
/* don't need to multiply by 1 for seconds */
default:
break;
/* don't need to multiply by 1 for seconds */
default:
xsign = ¶m.fp_asign;
param.fp_exclude_atime = !!neg_opt;
/* no break, this falls through to 'B' for btime */
xsign = ¶m.fp_asign;
param.fp_exclude_atime = !!neg_opt;
/* no break, this falls through to 'B' for btime */
case 'B':
if (c == 'B') {
xtime = ¶m.fp_btime;
case 'B':
if (c == 'B') {
xtime = ¶m.fp_btime;
param.fp_exclude_btime = !!neg_opt;
}
/* no break, this falls through to 'C' for ctime */
param.fp_exclude_btime = !!neg_opt;
}
/* no break, this falls through to 'C' for ctime */
case 'C':
if (c == 'C') {
xtime = ¶m.fp_ctime;
case 'C':
if (c == 'C') {
xtime = ¶m.fp_ctime;
param.fp_exclude_ctime = !!neg_opt;
}
/* no break, this falls through to 'M' for mtime */
param.fp_exclude_ctime = !!neg_opt;
}
/* no break, this falls through to 'M' for mtime */
case 'M':
if (c == 'M') {
xtime = ¶m.fp_mtime;
case 'M':
if (c == 'M') {
xtime = ¶m.fp_mtime;
case 't':
fprintf(stderr,
"warning: '-t' deprecated, use '--mdt-hash' or '-H' instead\n");
case 't':
fprintf(stderr,
"warning: '-t' deprecated, use '--mdt-hash' or '-H' instead\n");
#endif
case 'H':
param.fp_verbose |= VERBOSE_HASH_TYPE;
break;
#endif
case 'H':
param.fp_verbose |= VERBOSE_HASH_TYPE;
break;
- case 'i': /* fallthrough */
+ case 'i':
+ fallthrough;
case 'm':
param.fp_verbose |= VERBOSE_STRIPE_OFFSET;
break;
case 'm':
param.fp_verbose |= VERBOSE_STRIPE_OFFSET;
break;
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
case 't':
fprintf(stderr,
"warning: '--hash-type' and '-t' deprecated, use '--mdt-hash' or '-H' instead\n");
case 't':
fprintf(stderr,
"warning: '--hash-type' and '-t' deprecated, use '--mdt-hash' or '-H' instead\n");
#endif
case 'H':
lsa.lsa_pattern = check_hashtype(optarg);
#endif
case 'H':
lsa.lsa_pattern = check_hashtype(optarg);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
fprintf(stderr,
"%s setquota: unrecognized option '%s'\n",
progname, argv[optind - 1]);
fprintf(stderr,
"%s setquota: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
rc = CMD_HELP;
goto out;
case 'h':
rc = CMD_HELP;
goto out;
fprintf(stderr,
"%s data_version: unrecognized option '%s'\n",
progname, argv[optind - 1]);
fprintf(stderr,
"%s data_version: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
rc = CMD_HELP;
goto error;
case 'h':
rc = CMD_HELP;
goto error;
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
rc = CMD_HELP;
goto error;
case 'h':
rc = CMD_HELP;
goto error;
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
default:
fprintf(stderr, "%s: unrecognized option '%s'\n",
progname, argv[optind - 1]);
case 'h':
return CMD_HELP;
}
case 'h':
return CMD_HELP;
}
* Nothing needs to be done for these entries
* fallthrough
*/
* Nothing needs to be done for these entries
* fallthrough
*/
if (ostnames_buf)
free(ostnames_buf);
}
if (ostnames_buf)
free(ostnames_buf);
}