diff options
author | Dave Airlie <airlied@gmail.com> | 2024-04-23 00:05:06 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-22 16:05:06 +0200 |
commit | e931888d5024de814ce7119a18d6a959bfff3821 (patch) | |
tree | 1f09dcdd1115e7ac3841309791250e802fea03ab /sgemm.cpp | |
parent | 8960fe86ae075c846c5df8848230d1904ba8877f (diff) |
ggml : fix calloc argument ordering. (#6820)
Latest gcc complains here:
/home/airlied/devel/llama.cpp/ggml-alloc.c: In function ‘ggml_gallocr_new_n’:
/home/airlied/devel/llama.cpp/ggml-alloc.c:374:59: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
374 | ggml_gallocr_t galloc = (ggml_gallocr_t)calloc(sizeof(struct ggml_gallocr), 1);
| ^~~~~~
/home/airlied/devel/llama.cpp/ggml-alloc.c:374:59: note: earlier argument should specify number of elements, later size of each element
and a bunch more.
calloc is specified to take nmemb first then size, so realign the code.
In a couple of places there was a * x, 1 so I fixed those to use calloc properly.
Diffstat (limited to 'sgemm.cpp')
0 files changed, 0 insertions, 0 deletions