зеркало из https://github.com/microsoft/FX11.git
Fixed CodeQL warnings (#27)
This commit is contained in:
Родитель
67591774f9
Коммит
98fb4d48e7
|
@ -1916,6 +1916,14 @@ HRESULT CEffectLoader::LoadAssignments( uint32_t Assignments, SAssignment **ppAs
|
|||
case ELHS_GeometryShaderSO:
|
||||
assert(0); // Should never happen
|
||||
|
||||
#if (__cplusplus >= 201703L)
|
||||
[[fallthrough]];
|
||||
#elif defined(__clang__)
|
||||
[[clang::fallthrough]];
|
||||
#elif defined(_MSC_VER)
|
||||
__fallthrough;
|
||||
#endif
|
||||
|
||||
default:
|
||||
VHD( E_FAIL, "Internal loading error: invalid shader type." );
|
||||
}
|
||||
|
|
|
@ -680,7 +680,12 @@ static uint32_t ComputeHash(_In_reads_bytes_(cbToHash) const uint8_t *pb, _In_ u
|
|||
|
||||
c += cbToHash;
|
||||
|
||||
switch(cbLeft) // all the case statements fall through
|
||||
#ifdef _PREFAST_
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable:26819, "all the case statements fall through")
|
||||
#endif
|
||||
|
||||
switch(cbLeft)
|
||||
{
|
||||
case 11: c+=((uint32_t) pb[10] << 24);
|
||||
case 10: c+=((uint32_t) pb[9] << 16);
|
||||
|
@ -696,6 +701,10 @@ static uint32_t ComputeHash(_In_reads_bytes_(cbToHash) const uint8_t *pb, _In_ u
|
|||
case 1 : a+=pb[0];
|
||||
}
|
||||
|
||||
#ifdef _PREFAST_
|
||||
#pragma prefast(pop)
|
||||
#endif
|
||||
|
||||
HASH_MIX(a,b,c);
|
||||
|
||||
return c;
|
||||
|
@ -733,7 +742,12 @@ static uint32_t ComputeHashLower(_In_reads_bytes_(cbToHash) const uint8_t *pb, _
|
|||
for( size_t i = 0; i < cbLeft; i++ )
|
||||
pbT[i] = (uint8_t)tolower(pb[i]);
|
||||
|
||||
switch(cbLeft) // all the case statements fall through
|
||||
#ifdef _PREFAST_
|
||||
#pragma prefast(push)
|
||||
#pragma prefast(disable:26819, "all the case statements fall through")
|
||||
#endif
|
||||
|
||||
switch(cbLeft)
|
||||
{
|
||||
case 11: c+=((uint32_t) pbT[10] << 24);
|
||||
case 10: c+=((uint32_t) pbT[9] << 16);
|
||||
|
@ -749,6 +763,10 @@ static uint32_t ComputeHashLower(_In_reads_bytes_(cbToHash) const uint8_t *pb, _
|
|||
case 1 : a+=pbT[0];
|
||||
}
|
||||
|
||||
#ifdef _PREFAST_
|
||||
#pragma prefast(pop)
|
||||
#endif
|
||||
|
||||
HASH_MIX(a,b,c);
|
||||
|
||||
return c;
|
||||
|
|
Загрузка…
Ссылка в новой задаче