Commit 8d81559fa for llama.cpp
commit 8d81559fa7b8bcac9f7c8b478858953486371f90
Author: Adrien Gallouët <angt@huggingface.co>
Date: Fri Oct 2 11:07:06 2026 +0200
llama : silence unused-result warnings (#29839)
Signed-off-by: Adrien Gallouët <angt@huggingface.co>
diff --git a/src/llama-sampler.cpp b/src/llama-sampler.cpp
index b797c50be..6c958a287 100644
--- a/src/llama-sampler.cpp
+++ b/src/llama-sampler.cpp
@@ -1162,7 +1162,7 @@ static void llama_sampler_dist_apply(struct llama_sampler * smpl, llama_token_da
if (cur_p->size == 1) {
// keep the RNG state aligned with backend sampling, which draws once per output
- dist(ctx->rng);
+ (void) dist(ctx->rng);
cur_p->data[0].p = 1.0f;
return;
}
@@ -1377,7 +1377,7 @@ static void llama_sampler_dist_accept(struct llama_sampler * smpl, llama_token t
}
std::uniform_real_distribution<double> dist(0.0f, 1.0f);
- dist(sctx->rng);
+ (void) dist(sctx->rng);
++sctx->n_backend_draws_committed;
}