summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2020-05-06 16:47:03 -0400
committerNick Mathewson <nickm@torproject.org>2020-05-06 16:47:03 -0400
commitfecc5fd38d80093a9c189eece4acd41c35cd36c6 (patch)
treec741b52c2b172e0ff3eeb8f12bc4dd6bba02a396 /src/lib
parente61867416ec23b996de4c6a8c1c6875db549faf2 (diff)
parentd04b708b4bd47ee8df6796f19b25f558b2b18e91 (diff)
downloadtor-fecc5fd38d80093a9c189eece4acd41c35cd36c6.tar.gz
tor-fecc5fd38d80093a9c189eece4acd41c35cd36c6.zip
Merge branch 'maint-0.4.2' into maint-0.4.3
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cc/compat_compiler.h6
-rw-r--r--src/lib/crypt_ops/crypto_digest_nss.c2
-rw-r--r--src/lib/net/address.c1
3 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/cc/compat_compiler.h b/src/lib/cc/compat_compiler.h
index 1bb8c54a0c..015b5af320 100644
--- a/src/lib/cc/compat_compiler.h
+++ b/src/lib/cc/compat_compiler.h
@@ -50,6 +50,12 @@
#define CHECK_SCANF(formatIdx, firstArg)
#endif /* defined(__GNUC__) */
+#if defined(HAVE_ATTR_FALLTHROUGH)
+#define FALLTHROUGH __attribute__((fallthrough))
+#else
+#define FALLTHROUGH
+#endif
+
/* What GCC do we have? */
#ifdef __GNUC__
#define GCC_VERSION (__GNUC__ * 100 + __GNUC_MINOR__)
diff --git a/src/lib/crypt_ops/crypto_digest_nss.c b/src/lib/crypt_ops/crypto_digest_nss.c
index 7e7464273e..3092a08015 100644
--- a/src/lib/crypt_ops/crypto_digest_nss.c
+++ b/src/lib/crypt_ops/crypto_digest_nss.c
@@ -91,7 +91,7 @@ library_supports_digest(digest_algorithm_t alg)
switch (alg) {
case DIGEST_SHA1: /* Fall through */
case DIGEST_SHA256: /* Fall through */
- case DIGEST_SHA512: /* Fall through */
+ case DIGEST_SHA512:
return true;
case DIGEST_SHA3_256: /* Fall through */
case DIGEST_SHA3_512: /* Fall through */
diff --git a/src/lib/net/address.c b/src/lib/net/address.c
index ac4350b8fe..d623cdd131 100644
--- a/src/lib/net/address.c
+++ b/src/lib/net/address.c
@@ -929,6 +929,7 @@ tor_addr_copy_tight(tor_addr_t *dest, const tor_addr_t *src)
break;
case AF_INET6:
memcpy(dest->addr.in6_addr.s6_addr, src->addr.in6_addr.s6_addr, 16);
+ break;
case AF_UNSPEC:
break;
// LCOV_EXCL_START