Commit 62f251da authored by Jørgen Lind's avatar Jørgen Lind
Browse files

Merge branch feature/jorgen.lind/fallthrough with refs/heads/master into...

Merge branch feature/jorgen.lind/fallthrough with refs/heads/master into refs/merge-requests/271/train
parents c44c56a2 7dfae717
Pipeline #16428 passed with stages
in 7 minutes and 50 seconds
......@@ -5,6 +5,6 @@ function(setWarningFlagsForTarget target)
if (MSVC)
target_compile_options(${target} PRIVATE /W3 /WX)
else()
target_compile_options(${target} PRIVATE -Wall -Wextra -pedantic -Werror -Wno-unused-parameter -fms-extensions)
target_compile_options(${target} PRIVATE -Wall -Wextra -pedantic -Werror -Wno-unused-parameter -fms-extensions -Wimplicit-fallthrough=5)
endif()
endfunction()
#include "VDSObjectParser.h"
#include "Base64.h"
#include "CompilerDefines.h"
#include <sstream>
#include <locale.h>
#include <stdint.h>
......@@ -268,8 +269,8 @@ Json::Value TranslateVector(Json::Value const & root)
int i = 0;
switch(root.size())
{
case 4: vectorJson.append(root[element[i++]]); // falls through
case 3: vectorJson.append(root[element[i++]]); // falls through
case 4: vectorJson.append(root[element[i++]]); FALLTHROUGH;
case 3: vectorJson.append(root[element[i++]]); FALLTHROUGH;
case 2: vectorJson.append(root[element[i++]]);
vectorJson.append(root[element[i++]]);
}
......@@ -393,7 +394,7 @@ bool ParserState::getNextToken(const char ** buffer)
pbuffer += 2;
break;
}
// Falls through
FALLTHROUGH;
case '+':
pbuffer++;
......@@ -401,7 +402,7 @@ bool ParserState::getNextToken(const char ** buffer)
{
break;
}
// Falls through
FALLTHROUGH;
// Number
case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
foundNumber = true;
......
......@@ -24,6 +24,7 @@
#include "Rle.h"
#include "DataBlock.h"
#include "ParsedMetadata.h"
#include "CompilerDefines.h"
#include <OpenVDS/ValueConversion.h>
#include <VDS/VDS.h>
#include <VDS/GlobalStateImpl.h>
......@@ -165,7 +166,7 @@ static bool CopyDataBlockIntoLinearBuffer(const DataBlock &dataBlock, const void
return true;
case VolumeDataChannelDescriptor::Format_1Bit:
isConstant = (reinterpret_cast<const uint8_t*>(sourceBuffer)[0] == 0x00 || reinterpret_cast<const uint8_t*>(sourceBuffer)[0] == 0xff);
// Fall through
FALLTHROUGH;
case VolumeDataChannelDescriptor::Format_U8:
for(int32_t iX = 1; isConstant && iX < size[0]; iX++)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment