From 26ffb3213cce98f585c979268afc381527395173 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Wed, 2 May 2018 09:01:11 +0300 Subject: [PATCH] Changed "[[gnu::fallthrough]]" to "// FALLTHRU" --- libraries/audio/src/InboundAudioStream.cpp | 4 +--- libraries/entities/src/EntityTree.cpp | 4 +--- libraries/networking/src/ResourceCache.cpp | 8 ++------ libraries/shared/src/Gzip.cpp | 4 +--- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/libraries/audio/src/InboundAudioStream.cpp b/libraries/audio/src/InboundAudioStream.cpp index bbaedc003b..d60c5ba4ab 100644 --- a/libraries/audio/src/InboundAudioStream.cpp +++ b/libraries/audio/src/InboundAudioStream.cpp @@ -149,10 +149,8 @@ int InboundAudioStream::parseData(ReceivedMessage& message) { lostAudioData(packetsDropped); // fall through to OnTime case -#if defined(__GNUC__) - [[gnu::fallthrough]]; -#endif } + // FALLTHRU case SequenceNumberStats::OnTime: { // Packet is on time; parse its data to the ringbuffer if (message.getType() == PacketType::SilentAudioFrame diff --git a/libraries/entities/src/EntityTree.cpp b/libraries/entities/src/EntityTree.cpp index e9e4f2631a..3149527216 100644 --- a/libraries/entities/src/EntityTree.cpp +++ b/libraries/entities/src/EntityTree.cpp @@ -1402,9 +1402,7 @@ int EntityTree::processEditPacketData(ReceivedMessage& message, const unsigned c case PacketType::EntityAdd: isAdd = true; // fall through to next case -#if defined(__GNUC__) - [[gnu::fallthrough]]; -#endif + // FALLTHRU case PacketType::EntityPhysics: case PacketType::EntityEdit: { quint64 startDecode = 0, endDecode = 0; diff --git a/libraries/networking/src/ResourceCache.cpp b/libraries/networking/src/ResourceCache.cpp index 3b8c9fdac0..d3583687e8 100644 --- a/libraries/networking/src/ResourceCache.cpp +++ b/libraries/networking/src/ResourceCache.cpp @@ -749,10 +749,8 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) { case ResourceRequest::Result::Timeout: { qCDebug(networking) << "Timed out loading" << _url << "received" << _bytesReceived << "total" << _bytesTotal; // Fall through to other cases -#if defined(__GNUC__) - [[gnu::fallthrough]]; -#endif } + // FALLTHRU case ResourceRequest::Result::ServerUnavailable: { _attempts++; _attemptsRemaining--; @@ -770,10 +768,8 @@ bool Resource::handleFailedRequest(ResourceRequest::Result result) { break; } // fall through to final failure -#if defined(__GNUC__) - [[gnu::fallthrough]]; -#endif } + // FALLTHRU default: { _attemptsRemaining = 0; qCDebug(networking) << "Error loading " << _url << "attempt:" << _attempts << "attemptsRemaining:" << _attemptsRemaining; diff --git a/libraries/shared/src/Gzip.cpp b/libraries/shared/src/Gzip.cpp index 44fe13f439..25e214fffb 100644 --- a/libraries/shared/src/Gzip.cpp +++ b/libraries/shared/src/Gzip.cpp @@ -60,9 +60,7 @@ bool gunzip(QByteArray source, QByteArray &destination) { switch (status) { case Z_NEED_DICT: status = Z_DATA_ERROR; -#if defined(__GNUC__) - [[gnu::fallthrough]]; -#endif + // FALLTHRU case Z_DATA_ERROR: case Z_MEM_ERROR: case Z_STREAM_ERROR: