g10, sm, dirmngr, common: Add comment for fall through.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 10 May 2017 02:01:15 +0000 (11:01 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 10 May 2017 02:13:12 +0000 (11:13 +0900)
* common/b64dec.c (b64dec_proc): Comment to clarify.
* dirmngr/cdblib.c (cdb_make_put): Use same pattern to clarify.
* dirmngr/dirmngr-client.c (read_pem_certificate): Likewise.
* dirmngr/ks-engine-hkp.c (ks_hkp_get): Likewise.
* g10/armor.c (unarmor_pump): Likewise.
* g10/gpg.c (main): Likewise.
* g10/import.c (read_block): Likewise.
* g10/keygen.c (make_backsig): Likewise.
* g10/pkclist.c (check_signatures_trust):  Likewise.
* sm/gpgsm.c (main): Likewise.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
common/b64dec.c
dirmngr/cdblib.c
dirmngr/dirmngr-client.c
dirmngr/ks-engine-hkp.c
g10/armor.c
g10/gpg.c
g10/import.c
g10/keygen.c
g10/pkclist.c
sm/gpgsm.c

index 74cf933..6af494b 100644 (file)
@@ -118,6 +118,7 @@ b64dec_proc (struct b64state *state, void *buffer, size_t length,
           break;
         case s_init:
           ds = s_lfseen;
+          /* fall through */
         case s_lfseen:
           if (*s != "-----BEGIN "[pos])
             {
index c04690f..827399f 100644 (file)
@@ -617,7 +617,7 @@ cdb_make_put(struct cdb_make *cdbmp,
        else
          r = 1;
       }
-      /* fall */
+      /* fall through */
 
     case CDB_PUT_ADD:
       rl = cdbmp->cdb_rec[hval&255];
index c1ff635..4dc64bf 100644 (file)
@@ -517,7 +517,7 @@ read_pem_certificate (const char *fname, unsigned char **rbuf, size_t *rbuflen)
             }
           break;
         case s_init:
-          state = s_lfseen;
+          state = s_lfseen; /* fall through */
         case s_lfseen:
           if (c != "-----BEGIN "[pos])
             state = s_idle;
index 1592fab..ddb8549 100644 (file)
@@ -1515,6 +1515,7 @@ ks_hkp_get (ctrl_t ctrl, parsed_uri_t uri, const char *keyspec, estream_t *r_fp)
 
     case KEYDB_SEARCH_MODE_FPR16:
       log_error ("HKP keyservers do not support v3 fingerprints\n");
+      /* fall through */
     default:
       return gpg_error (GPG_ERR_INV_USER_ID);
     }
index 7fb9a89..cc80968 100644 (file)
@@ -1440,7 +1440,7 @@ unarmor_pump (UnarmorPump x, int c)
         break;
       case STA_first_dash: /* just need for initialization */
         x->pos = 0;
-        x->state = STA_compare_header;
+        x->state = STA_compare_header; /* fall through */
       case STA_compare_header:
         if ( "-----BEGIN PGP SIGNATURE-----"[++x->pos] == c ) {
             if ( x->pos == 28 )
@@ -1521,7 +1521,7 @@ unarmor_pump (UnarmorPump x, int c)
         /* assume that we are at the next line */
         x->state = STA_read_crc;
         x->pos = 0;
-        x->mycrc = 0;
+        x->mycrc = 0; /* fall through */
       case STA_read_crc:
         if( (c = asctobin[c]) == 255 ) {
             rval = -1; /* ready */
index ecddb20..80e5197 100644 (file)
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -4303,9 +4303,9 @@ main (int argc, char **argv)
        break;
 
       case aCheckKeys:
-       opt.check_sigs = 1;
+       opt.check_sigs = 1; /* fall through */
       case aListSigs:
-       opt.list_sigs = 1;
+       opt.list_sigs = 1; /* fall through */
       case aListKeys:
        sl = NULL;
        for( ; argc; argc--, argv++ )
@@ -4468,7 +4468,7 @@ main (int argc, char **argv)
        break;
 
       case aFastImport:
-        opt.import_options |= IMPORT_FAST;
+        opt.import_options |= IMPORT_FAST; /* fall through */
       case aImport:
        import_keys (ctrl, argc? argv:NULL, argc, NULL, opt.import_options);
        break;
@@ -4930,7 +4930,7 @@ main (int argc, char **argv)
         if (!opt.quiet)
           log_info (_("WARNING: no command supplied."
                       "  Trying to guess what you mean ...\n"));
-        /*FALLTHU*/
+        /*FALLTHRU*/
       case aListPackets:
        if( argc > 1 )
            wrong_args("[filename]");
index a942c2e..d9d658b 100644 (file)
@@ -868,7 +868,7 @@ read_block( IOBUF a, int with_meta,
                pkt = NULL;
                goto ready;
               }
-           in_cert = 1;
+           in_cert = 1; /* fall through */
          default:
           x_default:
            if (in_cert && valid_keyblock_packet (pkt->pkttype))
index 2db37bf..0dfed63 100644 (file)
@@ -910,10 +910,10 @@ make_backsig (ctrl_t ctrl, PKT_signature *sig, PKT_public_key *pk,
                case 2:
                  pktlen  = (size_t)buf[mark++] << 24;
                  pktlen |= buf[mark++] << 16;
-
+                 /* fall through */
                case 1:
                  pktlen |= buf[mark++] << 8;
-
+                 /* fall through */
                case 0:
                  pktlen |= buf[mark++];
                }
index e65da25..ab024d9 100644 (file)
@@ -632,7 +632,7 @@ check_signatures_trust (ctrl_t ctrl, PKT_signature *sig)
               log_info (_("trustlevel adjusted to FULL"
                           " due to valid PKA info\n"));
             }
-          /* (fall through) */
+          /* fall through */
         case TRUST_FULLY:
           if (!okay)
             {
index bcf479a..cb181e8 100644 (file)
@@ -1855,7 +1855,7 @@ main ( int argc, char **argv)
 
     case aListChain:
     case aDumpChain:
-       ctrl.with_chain = 1;
+       ctrl.with_chain = 1; /* fall through */
     case aListKeys:
     case aDumpKeys:
     case aListExternalKeys: