summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2017-05-10 04:01:15 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2017-05-10 04:13:12 +0200
commit0ce94a9698104d9bfc73d5a37478189564c96eb4 (patch)
tree873e5ba87e7aa97e86970d5f1de1daf08f0d2cc5
parentg10: Stop compiler warning for t-stutter. (diff)
downloadgnupg2-0ce94a9698104d9bfc73d5a37478189564c96eb4.tar.xz
gnupg2-0ce94a9698104d9bfc73d5a37478189564c96eb4.zip
g10, sm, dirmngr, common: Add comment for fall through.
* 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>
-rw-r--r--common/b64dec.c1
-rw-r--r--dirmngr/cdblib.c2
-rw-r--r--dirmngr/dirmngr-client.c2
-rw-r--r--dirmngr/ks-engine-hkp.c1
-rw-r--r--g10/armor.c4
-rw-r--r--g10/gpg.c8
-rw-r--r--g10/import.c2
-rw-r--r--g10/keygen.c4
-rw-r--r--g10/pkclist.c2
-rw-r--r--sm/gpgsm.c2
10 files changed, 15 insertions, 13 deletions
diff --git a/common/b64dec.c b/common/b64dec.c
index 74cf93351..6af494b79 100644
--- a/common/b64dec.c
+++ b/common/b64dec.c
@@ -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])
{
diff --git a/dirmngr/cdblib.c b/dirmngr/cdblib.c
index c04690ff8..827399f7e 100644
--- a/dirmngr/cdblib.c
+++ b/dirmngr/cdblib.c
@@ -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];
diff --git a/dirmngr/dirmngr-client.c b/dirmngr/dirmngr-client.c
index c1ff635de..4dc64bf81 100644
--- a/dirmngr/dirmngr-client.c
+++ b/dirmngr/dirmngr-client.c
@@ -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;
diff --git a/dirmngr/ks-engine-hkp.c b/dirmngr/ks-engine-hkp.c
index 1592fab34..ddb854906 100644
--- a/dirmngr/ks-engine-hkp.c
+++ b/dirmngr/ks-engine-hkp.c
@@ -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);
}
diff --git a/g10/armor.c b/g10/armor.c
index 7fb9a89ee..cc8096862 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -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 */
diff --git a/g10/gpg.c b/g10/gpg.c
index ecddb20d0..80e51974a 100644
--- 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]");
diff --git a/g10/import.c b/g10/import.c
index a942c2e5f..d9d658b1c 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -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))
diff --git a/g10/keygen.c b/g10/keygen.c
index 2db37bf34..0dfed63a7 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -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++];
}
diff --git a/g10/pkclist.c b/g10/pkclist.c
index e65da2574..ab024d9f2 100644
--- a/g10/pkclist.c
+++ b/g10/pkclist.c
@@ -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)
{
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index bcf479ac5..cb181e8f6 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -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: