Last active
June 22, 2017 10:49
-
-
Save gicmo/06424509ff86343ccd56e407978f911e to your computer and use it in GitHub Desktop.
renderdoc fallthrough patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit a95e03f0be450bb30af5cf1cd968ca8191c2560d (HEAD -> master) | |
Author: Christian Kellner <[email protected]> | |
Date: Mon Jun 19 17:45:54 2017 +0200 | |
Add fallthrough comments to fix gcc warnings | |
diff --git a/qrenderdoc/3rdparty/scintilla/src/RESearch.cxx b/qrenderdoc/3rdparty/scintilla/src/RESearch.cxx | |
index 4e290309..100c6f84 100644 | |
--- a/qrenderdoc/3rdparty/scintilla/src/RESearch.cxx | |
+++ b/qrenderdoc/3rdparty/scintilla/src/RESearch.cxx | |
@@ -782,8 +782,9 @@ int RESearch::Execute(CharacterIndexer &ci, int lp, int endp) { | |
c = *(ap+1); | |
while ((lp < endp) && (static_cast<unsigned char>(ci.CharAt(lp)) != c)) | |
lp++; | |
if (lp >= endp) /* if EOS, fail, else fall through. */ | |
return 0; | |
+ /* intentionally fallthrough */ | |
default: /* regular matching all the way. */ | |
while (lp < endp) { | |
ep = PMatch(ci, lp, endp, ap); | |
diff --git a/qrenderdoc/Windows/Dialogs/VirtualFileDialog.cpp b/qrenderdoc/Windows/Dialogs/VirtualFileDialog.cpp | |
index 6f568f48..2e2eaea2 100644 | |
--- a/qrenderdoc/Windows/Dialogs/VirtualFileDialog.cpp | |
+++ b/qrenderdoc/Windows/Dialogs/VirtualFileDialog.cpp | |
@@ -341,6 +341,7 @@ public: | |
else | |
return fileIcon[hideIndex]; | |
} | |
+ break; | |
case Qt::TextAlignmentRole: | |
if(index.column() == 1) | |
return Qt::AlignRight; | |
diff --git a/renderdoc/3rdparty/jpeg-compressor/jpgd.cpp b/renderdoc/3rdparty/jpeg-compressor/jpgd.cpp | |
index 44d3b239..0bfe3fa1 100644 | |
--- a/renderdoc/3rdparty/jpeg-compressor/jpgd.cpp | |
+++ b/renderdoc/3rdparty/jpeg-compressor/jpgd.cpp | |
@@ -1317,7 +1317,7 @@ void jpeg_decoder::locate_sof_marker() | |
switch (c) | |
{ | |
case M_SOF2: | |
- m_progressive_flag = JPGD_TRUE; | |
+ m_progressive_flag = JPGD_TRUE; /* intentional fallthrough */ | |
case M_SOF0: /* baseline DCT */ | |
case M_SOF1: /* extended sequential DCT */ | |
{ | |
diff --git a/renderdoc/driver/gl/wrappers/gl_debug_funcs.cpp b/renderdoc/driver/gl/wrappers/gl_debug_funcs.cpp | |
index 1ab13db8..7fea544c 100644 | |
--- a/renderdoc/driver/gl/wrappers/gl_debug_funcs.cpp | |
+++ b/renderdoc/driver/gl/wrappers/gl_debug_funcs.cpp | |
@@ -45,21 +45,21 @@ bool WrappedOpenGL::Serialise_glObjectLabel(GLenum identifier, GLuint name, GLsi | |
switch(identifier) | |
{ | |
case eGL_TEXTURE: liveid = GetResourceManager()->GetID(TextureRes(GetCtx(), name)); break; | |
- case eGL_BUFFER_OBJECT_EXT: extvariant = true; | |
+ case eGL_BUFFER_OBJECT_EXT: extvariant = true; // intentional fallthrough | |
case eGL_BUFFER: liveid = GetResourceManager()->GetID(BufferRes(GetCtx(), name)); break; | |
- case eGL_PROGRAM_OBJECT_EXT: extvariant = true; | |
+ case eGL_PROGRAM_OBJECT_EXT: extvariant = true; // intentional fallthrough | |
case eGL_PROGRAM: liveid = GetResourceManager()->GetID(ProgramRes(GetCtx(), name)); break; | |
- case eGL_PROGRAM_PIPELINE_OBJECT_EXT: extvariant = true; | |
+ case eGL_PROGRAM_PIPELINE_OBJECT_EXT: extvariant = true; // intentional fallthrough | |
case eGL_PROGRAM_PIPELINE: | |
liveid = GetResourceManager()->GetID(ProgramPipeRes(GetCtx(), name)); | |
break; | |
- case eGL_VERTEX_ARRAY_OBJECT_EXT: extvariant = true; | |
+ case eGL_VERTEX_ARRAY_OBJECT_EXT: extvariant = true; // intentional fallthrough | |
case eGL_VERTEX_ARRAY: | |
liveid = GetResourceManager()->GetID(VertexArrayRes(GetCtx(), name)); | |
break; | |
- case eGL_SHADER_OBJECT_EXT: extvariant = true; | |
+ case eGL_SHADER_OBJECT_EXT: extvariant = true; // intentional fallthrough | |
case eGL_SHADER: liveid = GetResourceManager()->GetID(ShaderRes(GetCtx(), name)); break; | |
- case eGL_QUERY_OBJECT_EXT: extvariant = true; | |
+ case eGL_QUERY_OBJECT_EXT: extvariant = true; // intentional fallthrough | |
case eGL_QUERY: liveid = GetResourceManager()->GetID(QueryRes(GetCtx(), name)); break; | |
case eGL_TRANSFORM_FEEDBACK: | |
liveid = GetResourceManager()->GetID(FeedbackRes(GetCtx(), name)); | |
diff --git a/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp b/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp | |
index d3ecf4f6..41d36908 100644 | |
--- a/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp | |
+++ b/renderdoc/driver/shaders/spirv/spirv_disassemble.cpp | |
@@ -5554,7 +5554,7 @@ void ParseSPIRV(uint32_t *spirv, size_t spirvLength, SPVModule &module) | |
case spv::OpSNegate: | |
case spv::OpNot: | |
case spv::OpLogicalNot: | |
- mathop = true; // deliberate fallthrough | |
+ mathop = true; // intentional fallthrough | |
case spv::OpCompositeConstruct: | |
case spv::OpAccessChain: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment