mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
build: fix gcc7 implicit fallthrough warnings
Mark intended fallthroughs with /* FALLTHROUGH */ so that gcc will know it's expected and won't warn on [-Wimplicit-fallthrough=]. Closes https://github.com/curl/curl/pull/1297
This commit is contained in:
parent
6fc91f6d3a
commit
cbff751e95
@ -342,6 +342,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
|
||||
#else
|
||||
current_form->flags |= HTTPPOST_PTRNAME; /* fall through */
|
||||
#endif
|
||||
/* FALLTHROUGH */
|
||||
case CURLFORM_COPYNAME:
|
||||
if(current_form->name)
|
||||
return_value = CURL_FORMADD_OPTION_TWICE;
|
||||
|
@ -3214,6 +3214,7 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
|
||||
|
||||
/* until we cope better with prematurely ended requests, let them
|
||||
* fallback as if in complete failure */
|
||||
/* FALLTHROUGH */
|
||||
default: /* by default, an error means the control connection is
|
||||
wedged and should not be used anymore */
|
||||
ftpc->ctl_valid = FALSE;
|
||||
|
@ -539,6 +539,7 @@ int cert_stuff(struct connectdata *conn,
|
||||
if(!key_file)
|
||||
/* cert & key can only be in PEM case in the same file */
|
||||
key_file=cert_file;
|
||||
/* FALLTHROUGH */
|
||||
case SSL_FILETYPE_ASN1:
|
||||
if(SSL_CTX_use_PrivateKey_file(ctx, key_file, file_type) != 1) {
|
||||
failf(data, "unable to set private key file: '%s' type %s",
|
||||
|
@ -185,6 +185,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
|
||||
switch(type) {
|
||||
case CURLINFO_TEXT:
|
||||
fprintf(output, "%s== Info: %s", timebuf, data);
|
||||
/* FALLTHROUGH */
|
||||
default: /* in case a new one is introduced to shock us */
|
||||
return 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user