Use fallthrough statement attribute (moar)
This commit is contained in:
@@ -972,8 +972,8 @@ process_stream(krb5_context contextp,
|
|||||||
INSIST(gctx.ctx == NULL);
|
INSIST(gctx.ctx == NULL);
|
||||||
|
|
||||||
gctx.inprogress = 1;
|
gctx.inprogress = 1;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case RPG_CONTINUE_INIT: {
|
case RPG_CONTINUE_INIT: {
|
||||||
gss_name_t src_name = GSS_C_NO_NAME;
|
gss_name_t src_name = GSS_C_NO_NAME;
|
||||||
krb5_data in;
|
krb5_data in;
|
||||||
|
@@ -62,8 +62,8 @@ copy_type (const char *from, const char *to, const Type *t, int preserve)
|
|||||||
copy_primitive ("heim_integer", from, to);
|
copy_primitive ("heim_integer", from, to);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case TBoolean:
|
case TBoolean:
|
||||||
case TEnumerated :
|
case TEnumerated :
|
||||||
fprintf(codefile, "*(%s) = *(%s);\n", to, from);
|
fprintf(codefile, "*(%s) = *(%s);\n", to, from);
|
||||||
|
@@ -929,8 +929,8 @@ OM_uint32 GSSAPI_CALLCONV _gsskrb5_init_sec_context
|
|||||||
time_rec);
|
time_rec);
|
||||||
if (ret != GSS_S_COMPLETE)
|
if (ret != GSS_S_COMPLETE)
|
||||||
break;
|
break;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case INITIATOR_RESTART:
|
case INITIATOR_RESTART:
|
||||||
ret = init_auth_restart(minor_status,
|
ret = init_auth_restart(minor_status,
|
||||||
cred,
|
cred,
|
||||||
|
@@ -424,8 +424,8 @@ int main(int argc, char **argv)
|
|||||||
break;
|
break;
|
||||||
case 'h':
|
case 'h':
|
||||||
s_exit_code = EXIT_SUCCESS;
|
s_exit_code = EXIT_SUCCESS;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
default:
|
default:
|
||||||
s_usage(argv[0]);
|
s_usage(argv[0]);
|
||||||
}
|
}
|
||||||
|
@@ -2438,12 +2438,12 @@ hx509_verify_path(hx509_context context,
|
|||||||
* EE checking below.
|
* EE checking below.
|
||||||
*/
|
*/
|
||||||
type = EE_CERT;
|
type = EE_CERT;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
}
|
}
|
||||||
fallthrough
|
|
||||||
}
|
}
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case EE_CERT:
|
case EE_CERT:
|
||||||
/*
|
/*
|
||||||
* If there where any proxy certificates in the chain
|
* If there where any proxy certificates in the chain
|
||||||
|
@@ -182,8 +182,8 @@ fill_CMSIdentifier(const hx509_cert cert,
|
|||||||
&id->u.subjectKeyIdentifier);
|
&id->u.subjectKeyIdentifier);
|
||||||
if (ret == 0)
|
if (ret == 0)
|
||||||
break;
|
break;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case CMS_ID_NAME: {
|
case CMS_ID_NAME: {
|
||||||
hx509_name name;
|
hx509_name name;
|
||||||
|
|
||||||
|
@@ -230,8 +230,8 @@ hx509_pem_read(hx509_context context,
|
|||||||
where = INDATA;
|
where = INDATA;
|
||||||
goto indata;
|
goto indata;
|
||||||
}
|
}
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case INHEADER:
|
case INHEADER:
|
||||||
if (buf[0] == '\0') {
|
if (buf[0] == '\0') {
|
||||||
where = INDATA;
|
where = INDATA;
|
||||||
|
@@ -209,8 +209,8 @@ _kafs_derive_des_key(krb5_enctype enctype, void *keydata, size_t keylen,
|
|||||||
ret = compress_parity_bits(keydata, &keylen);
|
ret = compress_parity_bits(keydata, &keylen);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
default:
|
default:
|
||||||
if (enctype < 0)
|
if (enctype < 0)
|
||||||
return KRB5_PROG_ETYPE_NOSUPP;
|
return KRB5_PROG_ETYPE_NOSUPP;
|
||||||
|
@@ -1192,8 +1192,8 @@ krb5_sendto_context(krb5_context context,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
action = KRB5_SENDTO_KRBHST;
|
action = KRB5_SENDTO_KRBHST;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case KRB5_SENDTO_KRBHST:
|
case KRB5_SENDTO_KRBHST:
|
||||||
if (ctx->krbhst == NULL) {
|
if (ctx->krbhst == NULL) {
|
||||||
ret = krb5_krbhst_init_flags(context, realm, type,
|
ret = krb5_krbhst_init_flags(context, realm, type,
|
||||||
@@ -1215,8 +1215,8 @@ krb5_sendto_context(krb5_context context,
|
|||||||
handle = heim_retain(ctx->krbhst);
|
handle = heim_retain(ctx->krbhst);
|
||||||
}
|
}
|
||||||
action = KRB5_SENDTO_TIMEOUT;
|
action = KRB5_SENDTO_TIMEOUT;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case KRB5_SENDTO_TIMEOUT:
|
case KRB5_SENDTO_TIMEOUT:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -472,6 +472,7 @@ heim_digest_generate_challenge(heim_digest_t context)
|
|||||||
case HEIM_DIGEST_TYPE_AUTO:
|
case HEIM_DIGEST_TYPE_AUTO:
|
||||||
context->type = HEIM_DIGEST_TYPE_RFC2831;
|
context->type = HEIM_DIGEST_TYPE_RFC2831;
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case HEIM_DIGEST_TYPE_RFC2831:
|
case HEIM_DIGEST_TYPE_RFC2831:
|
||||||
asprintf(&challenge, "realm=\"%s\",nonce=\"%s\",qop=\"%s\",algorithm=md5-sess,charset=utf-8,maxbuf=%s",
|
asprintf(&challenge, "realm=\"%s\",nonce=\"%s\",qop=\"%s\",algorithm=md5-sess,charset=utf-8,maxbuf=%s",
|
||||||
context->serverRealm, context->serverNonce, context->serverQOP, context->serverMaxbuf);
|
context->serverRealm, context->serverNonce, context->serverQOP, context->serverMaxbuf);
|
||||||
|
@@ -129,8 +129,8 @@ rk_fnmatch(const char *pattern, const char *string, int flags)
|
|||||||
--pattern;
|
--pattern;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
default:
|
default:
|
||||||
if (c != *string++)
|
if (c != *string++)
|
||||||
return (FNM_NOMATCH);
|
return (FNM_NOMATCH);
|
||||||
|
@@ -136,8 +136,8 @@ roken_get_homedir(char *home, size_t homesz)
|
|||||||
}
|
}
|
||||||
return home;
|
return home;
|
||||||
}
|
}
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_GETPWNAM_R
|
#ifdef HAVE_GETPWNAM_R
|
||||||
size_t buflen = 2048;
|
size_t buflen = 2048;
|
||||||
|
@@ -515,8 +515,8 @@ xyzprintf (struct snprintf_state *state, const char *char_format, va_list ap)
|
|||||||
}
|
}
|
||||||
case '\0' :
|
case '\0' :
|
||||||
--format;
|
--format;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case '%' :
|
case '%' :
|
||||||
(*state->append_char)(state, c);
|
(*state->append_char)(state, c);
|
||||||
++len;
|
++len;
|
||||||
|
@@ -377,8 +377,8 @@ strftime (char *buf, size_t maxsize, const char *format,
|
|||||||
break;
|
break;
|
||||||
case '\0' :
|
case '\0' :
|
||||||
--format;
|
--format;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case '%' :
|
case '%' :
|
||||||
ret = snprintf (buf, maxsize - n,
|
ret = snprintf (buf, maxsize - n,
|
||||||
"%%");
|
"%%");
|
||||||
|
@@ -424,8 +424,8 @@ strptime (const char *buf, const char *format, struct tm *timeptr)
|
|||||||
abort ();
|
abort ();
|
||||||
case '\0' :
|
case '\0' :
|
||||||
--format;
|
--format;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case '%' :
|
case '%' :
|
||||||
if (*buf == '%')
|
if (*buf == '%')
|
||||||
++buf;
|
++buf;
|
||||||
|
@@ -205,22 +205,24 @@ wind_ucs4utf8(const uint32_t *in, size_t in_len, char *out, size_t *out_len)
|
|||||||
case 4:
|
case 4:
|
||||||
out[3] = (ch | 0x80) & 0xbf;
|
out[3] = (ch | 0x80) & 0xbf;
|
||||||
ch = ch >> 6;
|
ch = ch >> 6;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case 3:
|
case 3:
|
||||||
out[2] = (ch | 0x80) & 0xbf;
|
out[2] = (ch | 0x80) & 0xbf;
|
||||||
ch = ch >> 6;
|
ch = ch >> 6;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case 2:
|
case 2:
|
||||||
out[1] = (ch | 0x80) & 0xbf;
|
out[1] = (ch | 0x80) & 0xbf;
|
||||||
ch = ch >> 6;
|
ch = ch >> 6;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case 1:
|
case 1:
|
||||||
out[0] = ch | first_char[len - 1];
|
out[0] = ch | first_char[len - 1];
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
out += len;
|
out += len;
|
||||||
@@ -488,17 +490,19 @@ wind_ucs2utf8(const uint16_t *in, size_t in_len, char *out, size_t *out_len)
|
|||||||
case 3:
|
case 3:
|
||||||
out[2] = (ch | 0x80) & 0xbf;
|
out[2] = (ch | 0x80) & 0xbf;
|
||||||
ch = ch >> 6;
|
ch = ch >> 6;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case 2:
|
case 2:
|
||||||
out[1] = (ch | 0x80) & 0xbf;
|
out[1] = (ch | 0x80) & 0xbf;
|
||||||
ch = ch >> 6;
|
ch = ch >> 6;
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
case 1:
|
case 1:
|
||||||
out[0] = ch | first_char[len - 1];
|
out[0] = ch | first_char[len - 1];
|
||||||
fallthrough
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
|
fallthrough
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
out += len;
|
out += len;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user