Adjust int types in format strings (#2009)

* tweak format sting types
This may not be all of them, but it's the ones which warn on OpenBSD

* complete the changes needed to fix the format string specifers

* avoid using inttypes, directly cast to size_t (u64 usually) instead

---------

Co-authored-by: Concedo <39025047+LostRuins@users.noreply.github.com>
This commit is contained in:
JustCommitRandomness
2026-03-06 11:06:18 +00:00
committed by GitHub
parent e36d7b6464
commit 2fbc3b2ae5
13 changed files with 37 additions and 37 deletions
+3 -3
View File
@@ -287,8 +287,8 @@ ModelLoadResult gpt2_v2_model_load(const std::string & fname, gpt2_v2_model & mo
}
if (tensor->ne[0] != ne[0] || tensor->ne[1] != ne[1]) {
fprintf(stderr, "%s: tensor '%s' has wrong shape in model file: got [%ld, %ld], expected [%d, %d]\n",
__func__, name.data(), tensor->ne[0], tensor->ne[1], ne[0], ne[1]);
fprintf(stderr, "%s: tensor '%s' has wrong shape in model file: got [%zu, %zu], expected [%zu, %zu]\n",
__func__, name.data(), (size_t)tensor->ne[0], (size_t)tensor->ne[1], (size_t)ne[0], (size_t)ne[1]);
return ModelLoadResult::FAIL;
}
@@ -650,4 +650,4 @@ bool gpt2_v2_eval(
ggml_v2_free(ctx0);
return true;
}
}