pqc-thunderbird / rnp

Manual clone of the repository https://github.com/rnpgp/rnp
Other
0 stars 0 forks source link

invalid fallthrough? #22

Closed falko-strenzke closed 1 year ago

falko-strenzke commented 1 year ago

in /home/fstrenzke/dev/tb_pqc/rnp-dev/src/librepgp/stream-key.cpp compiler warning about potential fallthrough:

static rnp_result_t
parse_secret_key_mpis(pgp_key_pkt_t &key, const uint8_t *mpis, size_t len)
{
    if (!mpis) {
        return RNP_ERROR_NULL_POINTER;
    }

    /* check the cleartext data */
    switch (key.sec_protection.s2k.usage) {
    case PGP_S2KU_NONE:
#if defined(ENABLE_CRYPTO_REFRESH)
        if(key.version == PGP_V6) {
            break; /* checksum removed for v6 and usage byte zero */
        }
#endif

If the fallthrough is correct, then it should be annoted accordingly.

TJ-91 commented 1 year ago

added fallthrough statement in d57536047174239a0687930da9c228e9a2166638