Skip to content

Tests: Fix Clang warnings (-Wswitch, -Wdangling-else ) - #544

Open
MaciekChoszczyk wants to merge 1 commit into
GPUOpen-LibrariesAndSDKs:masterfrom
MaciekChoszczyk:fix-clang-warnings
Open

MaciekChoszczyk wants to merge 1 commit into
GPUOpen-LibrariesAndSDKs:masterfrom
MaciekChoszczyk:fix-clang-warnings

Conversation

@MaciekChoszczyk

Copy link
Copy Markdown
  1. When building the test suite (src/Tests.cpp) with Clang, the compiler reported several -Wswitch and -Wdangling-else diagnostic warnings.

  2. Added missing default: assert(0); cases to eliminate -Wswitch warnings on unhandled enumeration values.

  3. Added explicit scope braces in TestDefragmentationSimple() to resolve -Wdangling-else.

  4. Built locally with Clang-CL: compiles cleanly with 0 warnings.

  5. Ran the test suite: all runtime tests pass without assertion failures.

@sawickiap

Copy link
Copy Markdown
Contributor

Thank you for this contribution. I merged it - to my fork for now:

https://github.com/sawickiap/VulkanMemoryAllocator

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants