From de6c2dfdec76932320d2cfe2e2162ff362955c57 Mon Sep 17 00:00:00 2001 From: Kawrakow Date: Wed, 24 Jun 2026 09:34:58 +0000 Subject: [PATCH] Compiler warnings --- src/llama-model-loader.cpp | 2 +- src/llama.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llama-model-loader.cpp b/src/llama-model-loader.cpp index 272a1403..180669d6 100644 --- a/src/llama-model-loader.cpp +++ b/src/llama-model-loader.cpp @@ -1053,7 +1053,7 @@ void llama_model_loader::load_data_for(struct ggml_tensor * cur) const { // Returns false if cancelled by progress_callback bool llama_model_loader::load_all_data( struct ggml_context * ctx, - struct llama_model * model, + [[maybe_unused]] llama_model * model, llama_buf_map & bufs_mmap, llama_mlocks * lmlocks, llama_progress_callback progress_callback, diff --git a/src/llama.cpp b/src/llama.cpp index 8a15066f..25c088b5 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -7146,7 +7146,7 @@ struct llama_context * llama_init_from_model( // main_gpu is a local index into model->devices throughout the codebase // (auto-fit assigns device_count-1, MTP clamps to [0, device_count), buffer-type // setup wraps with model.devices[main_gpu]). Translate to a raw device id here. - const int main_gpu_id = (model->main_gpu >= 0 && model->main_gpu < (int)model->devices.size()) + [[maybe_unused]] const int main_gpu_id = (model->main_gpu >= 0 && model->main_gpu < (int)model->devices.size()) ? model->devices[model->main_gpu] : model->main_gpu; #if defined(GGML_USE_METAL)