Skip to content

Conversation

@skrandy
Copy link
Contributor

@skrandy skrandy commented Sep 2, 2025

Fix warnings caused by initializing unsigned integers (uint32_t n_dims and uint64_t size) with negative values.

  • Changed uint32_t n_dims = -1 to 0 in tensor shape parsing.
  • Changed uint64_t size = -1 to 0 in string reading logic.

These values are overwritten by subsequent gr.read(...) calls, so using 0 as an initial placeholder eliminates unsigned integer underflow warnings without affecting runtime behavior.

@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Sep 2, 2025
@skrandy skrandy changed the title fix: resolve unsigned int initialization warning for n_dims/size in g… fix: resolve unsigned integer initialization warnings in gguf.cpp Sep 2, 2025
@JohannesGaessler JohannesGaessler merged commit 3de0082 into ggml-org:master Sep 2, 2025
47 of 48 checks passed
@skrandy skrandy deleted the fix-uint-warning branch September 3, 2025 02:21
walidbr pushed a commit to walidbr/llama.cpp that referenced this pull request Sep 7, 2025
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants