From e0cb26bd9e247c982219e639bc9b05cfacf46f11 Mon Sep 17 00:00:00 2001 From: orignal Date: Fri, 28 Feb 2020 14:15:41 -0500 Subject: [PATCH] fixed fallthough warning for C++17 --- libi2pd/Garlic.cpp | 2 +- libi2pd/Identity.cpp | 2 +- libi2pd/RouterContext.cpp | 2 +- libi2pd/Streaming.cpp | 2 +- libi2pd_client/SOCKS.cpp | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libi2pd/Garlic.cpp b/libi2pd/Garlic.cpp index c7d0e21d..597602fb 100644 --- a/libi2pd/Garlic.cpp +++ b/libi2pd/Garlic.cpp @@ -911,7 +911,7 @@ namespace garlic case eGarlicDeliveryTypeDestination: LogPrint (eLogDebug, "Garlic: type destination"); buf += 32; // TODO: check destination - // no break here + [[fallthrough]]; // no break here case eGarlicDeliveryTypeLocal: { LogPrint (eLogDebug, "Garlic: type local"); diff --git a/libi2pd/Identity.cpp b/libi2pd/Identity.cpp index de94732f..5116ecd8 100644 --- a/libi2pd/Identity.cpp +++ b/libi2pd/Identity.cpp @@ -723,7 +723,7 @@ namespace data case SIGNING_KEY_TYPE_RSA_SHA384_3072: case SIGNING_KEY_TYPE_RSA_SHA512_4096: LogPrint (eLogWarning, "Identity: RSA signature type is not supported. Creating EdDSA"); - // no break here + [[fallthrough]]; // no break here case SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519: i2p::crypto::CreateEDDSA25519RandomKeys (priv, pub); break; diff --git a/libi2pd/RouterContext.cpp b/libi2pd/RouterContext.cpp index 2c07c21b..c282f095 100644 --- a/libi2pd/RouterContext.cpp +++ b/libi2pd/RouterContext.cpp @@ -338,7 +338,7 @@ namespace i2p { case low : /* not set */; break; case extra : caps |= i2p::data::RouterInfo::eExtraBandwidth; break; // 'P' - case unlim : caps |= i2p::data::RouterInfo::eExtraBandwidth; // no break here, extra + high means 'X' + case unlim : caps |= i2p::data::RouterInfo::eExtraBandwidth; [[fallthrough]]; // no break here, extra + high means 'X' case high : caps |= i2p::data::RouterInfo::eHighBandwidth; break; } m_RouterInfo.SetCaps (caps); diff --git a/libi2pd/Streaming.cpp b/libi2pd/Streaming.cpp index d666d786..e486fa79 100644 --- a/libi2pd/Streaming.cpp +++ b/libi2pd/Streaming.cpp @@ -847,7 +847,7 @@ namespace stream break; case 2: m_RTO = INITIAL_RTO; // drop RTO to initial upon tunnels pair change first time - // no break here + [[fallthrough]]; // no break here case 4: if (m_RoutingSession) m_RoutingSession->SetSharedRoutingPath (nullptr); UpdateCurrentRemoteLease (); // pick another lease diff --git a/libi2pd_client/SOCKS.cpp b/libi2pd_client/SOCKS.cpp index 8a67901c..c01aa212 100644 --- a/libi2pd_client/SOCKS.cpp +++ b/libi2pd_client/SOCKS.cpp @@ -433,6 +433,7 @@ namespace proxy break; case CMD_UDP: if (m_socksv == SOCKS5) break; + [[fallthrough]]; default: LogPrint(eLogError, "SOCKS: invalid command: ", ((int)*sock_buff)); SocksRequestFailed(SOCKS5_GEN_FAIL);