diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-04-27 12:36:59 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-26 21:36:59 -0700 |
| commit | 3acbe8145c60f4d1e7a180b4602a94269a489df5 (patch) | |
| tree | 8031e7ca897260ac3ab6d2a920864f3114bc8668 /tools | |
| parent | a3da31c189a1cc9bdf85a42ac359b8c2777f3550 (diff) | |
Fix most of the disabled warnings on gcc/clang (#2839)
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/gfx/cuda/cuda-device.cpp | 2 | ||||
| -rw-r--r-- | tools/render-test/shader-input-layout.cpp | 1 | ||||
| -rw-r--r-- | tools/slang-cpp-extractor/macro-writer.cpp | 2 | ||||
| -rw-r--r-- | tools/slang-test/slang-test-main.cpp | 2 |
4 files changed, 3 insertions, 4 deletions
diff --git a/tools/gfx/cuda/cuda-device.cpp b/tools/gfx/cuda/cuda-device.cpp index 4aeecb606..bbf50cc58 100644 --- a/tools/gfx/cuda/cuda-device.cpp +++ b/tools/gfx/cuda/cuda-device.cpp @@ -210,7 +210,7 @@ SLANG_NO_THROW SlangResult SLANG_MCALL DeviceImpl::initialize(const Desc& desc) limits.maxTextureDimension2D = Math::Min(deviceProps.maxSurface2D[0], deviceProps.maxSurface2D[1]); limits.maxTextureDimension3D = Math::Min(deviceProps.maxSurface3D[0], Math::Min(deviceProps.maxSurface3D[1], deviceProps.maxSurface3D[2])); limits.maxTextureDimensionCube = deviceProps.maxSurfaceCubemap; - limits.maxTextureArrayLayers = Math::Min(deviceProps.maxSurface1DLayered[2], deviceProps.maxSurface2DLayered[2]); + limits.maxTextureArrayLayers = Math::Min(deviceProps.maxSurface1DLayered[1], deviceProps.maxSurface2DLayered[2]); // limits.maxVertexInputElements // limits.maxVertexInputElementOffset diff --git a/tools/render-test/shader-input-layout.cpp b/tools/render-test/shader-input-layout.cpp index 2883dd465..b8c505607 100644 --- a/tools/render-test/shader-input-layout.cpp +++ b/tools/render-test/shader-input-layout.cpp @@ -731,6 +731,7 @@ namespace renderer_test throw ShaderInputLayoutFormatException(String("Unknown shader input type '") + word + String("' at line") + String(parser.NextToken().Position.Line)); } parser.ReadToken(); + return nullptr; } String parseName(Misc::TokenReader& parser) diff --git a/tools/slang-cpp-extractor/macro-writer.cpp b/tools/slang-cpp-extractor/macro-writer.cpp index 0f217cd4e..24d95850a 100644 --- a/tools/slang-cpp-extractor/macro-writer.cpp +++ b/tools/slang-cpp-extractor/macro-writer.cpp @@ -25,8 +25,6 @@ SLANG_FORCE_INLINE static void _indent(Index indentCount, StringBuilder& out) { SlangResult MacroWriter::calcDef(NodeTree* tree, SourceOrigin* origin, StringBuilder& out) { - Node* currentScope = nullptr; - for (Node* node : origin->m_nodes) { if (node->isReflected()) diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp index 884a20a0e..8595cac12 100644 --- a/tools/slang-test/slang-test-main.cpp +++ b/tools/slang-test/slang-test-main.cpp @@ -222,7 +222,7 @@ void skipToEndOfLine(char const** ioCursor) cursor++; } } - ; // fall through to: + [[fallthrough]]; case 0: *ioCursor = cursor; return; |
