curl/lib/vtls
Daniel Gustafsson 12246eddc5 lib: avoid fallthrough cases in switch statements
Commit b5a434f7f0 inhibits the warning
on implicit fallthrough cases, since the current coding of indicating
fallthrough with comments is falling out of fashion with new compilers.
This attempts to make the issue smaller by rewriting fallthroughs to no
longer fallthrough, via either breaking the cases or turning switch
statements into if statements.

  lib/content_encoding.c: the fallthrough codepath is simply copied
    into the case as it's a single line.
  lib/http_ntlm.c: the fallthrough case skips a state in the state-
    machine and fast-forwards to NTLMSTATE_LAST. Do this before the
    switch statement instead to set up the states that we actually
    want.
  lib/http_proxy.c: the fallthrough is just falling into exiting the
    switch statement which can be done easily enough in the case.
  lib/mime.c: switch statement rewritten as if statement.
  lib/pop3.c: the fallthrough case skips to the next state in the
    statemachine, do this explicitly instead.
  lib/urlapi.c: switch statement rewritten as if statement.
  lib/vssh/wolfssh.c: the fallthrough cases fast-forwards the state
    machine, do this by running another iteration of the switch
    statement instead.
  lib/vtls/gtls.c: switch statement rewritten as if statement.
  lib/vtls/nss.c: the fallthrough codepath is simply copied into the
    case as it's a single line. Also twiddle a comment to not be
    inside a non-brace if statement.

Closes: #7322
See-also: #7295
Reviewed-by: Daniel Stenberg <daniel@haxx.se>
2021-09-29 10:00:52 +02:00
..
bearssl.c vtls: Fix a memory leak if an SSL session cannot be added to the cache 2021-09-24 13:23:42 +02:00
bearssl.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
gskit.c lib: don't use strerror() 2021-09-09 07:53:42 +02:00
gskit.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
gtls.c lib: avoid fallthrough cases in switch statements 2021-09-29 10:00:52 +02:00
gtls.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
keylog.c curl.se: new home 2020-11-04 23:59:47 +01:00
keylog.h curl.se: new home 2020-11-04 23:59:47 +01:00
mbedtls_threadlock.c misc: update incorrect copyright year ranges 2021-08-16 11:21:47 +02:00
mbedtls_threadlock.h curl.se: new home 2020-11-04 23:59:47 +01:00
mbedtls.c vtls: Fix a memory leak if an SSL session cannot be added to the cache 2021-09-24 13:23:42 +02:00
mbedtls.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
mesalink.c vtls: Fix a memory leak if an SSL session cannot be added to the cache 2021-09-24 13:23:42 +02:00
mesalink.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
nss.c lib: avoid fallthrough cases in switch statements 2021-09-29 10:00:52 +02:00
nssg.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
openssl.c vtls: Fix a memory leak if an SSL session cannot be added to the cache 2021-09-24 13:23:42 +02:00
openssl.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
rustls.c rustls: add strerror.h include 2021-09-10 15:20:20 +02:00
rustls.h copyright: update copyright year ranges to 2021 2021-03-27 23:00:14 +01:00
schannel_verify.c vtls: fix typo in schannel_verify.c 2021-08-13 17:39:59 +02:00
schannel.c vtls: Fix a memory leak if an SSL session cannot be added to the cache 2021-09-24 13:23:42 +02:00
schannel.h schannel: don't use static to store selected ciphers 2021-05-24 07:56:05 +02:00
sectransp.c vtls: Fix a memory leak if an SSL session cannot be added to the cache 2021-09-24 13:23:42 +02:00
sectransp.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00
vtls.c vtls: Fix a memory leak if an SSL session cannot be added to the cache 2021-09-24 13:23:42 +02:00
vtls.h vtls: Fix a memory leak if an SSL session cannot be added to the cache 2021-09-24 13:23:42 +02:00
wolfssl.c vtls: Fix a memory leak if an SSL session cannot be added to the cache 2021-09-24 13:23:42 +02:00
wolfssl.h copyright: fix year ranges 2020-11-05 08:22:10 +01:00