Skip to content

Conversation

@ggerganov
Copy link
Member

Minor change to eliminate some compile warnings when building With Vulkan on MacOS:

[ 19%] Building CXX object ggml/src/ggml-vulkan/CMakeFiles/ggml-vulkan.dir/ggml-vulkan.cpp.o
/Users/ggerganov/development/github/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:8363:9: warning: suggest braces around initialization of subobject [-Wmissing-braces]
 8363 |         sections[0], sections[1], sections[2], sections[3], backprop
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |         {                                                 }
/Users/ggerganov/development/github/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:9630:16: warning: 'return' will never be executed [-Wunreachable-code-return]
 9630 |         return false;
      |                ^~~~~
/Users/ggerganov/development/github/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:11154:15: warning: 'break' will never be executed [-Wunreachable-code-break]
 11154 |             } break;
       |               ^~~~~
/Users/ggerganov/development/github/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:11102:15: warning: 'break' will never be executed [-Wunreachable-code-break]
 11102 |             } break;
       |               ^~~~~
/Users/ggerganov/development/github/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:11085:15: warning: 'break' will never be executed [-Wunreachable-code-break]
 11085 |             } break;
       |               ^~~~~
/Users/ggerganov/development/github/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:10995:15: warning: 'break' will never be executed [-Wunreachable-code-break]
 10995 |             } break;
       |               ^~~~~
/Users/ggerganov/development/github/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:10931:13: warning: 'break' will never be executed [-Wunreachable-code-break]
 10931 |             break;
       |             ^~~~~
/Users/ggerganov/development/github/llama.cpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp:10915:13: warning: 'break' will never be executed [-Wunreachable-code-break]
 10915 |             break;
       |             ^~~~~
8 warnings generated.

@ggerganov ggerganov requested a review from 0cc4m as a code owner August 15, 2025 08:37
@github-actions github-actions bot added Vulkan Issues specific to the Vulkan backend ggml changes relating to the ggml tensor library for machine learning labels Aug 15, 2025
Copy link
Member

@danbev danbev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally that the warnings are gone.

@0cc4m 0cc4m merged commit db3010b into master Aug 15, 2025
52 of 55 checks passed
@ggerganov ggerganov deleted the gg/vulkan-clang-warnings branch August 16, 2025 05:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning Vulkan Issues specific to the Vulkan backend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants