From a6bf72e895732c7ee5a04ed49248306695d18933 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Mon, 16 Feb 2026 08:59:26 +0000 Subject: [PATCH] Fix compilation Fix compilation error: /oai-ran/openair1/SIMULATION/NR_PHY/dlsim.c:932:42: error: variable 'h_channel_coeffs' set but not used [-Werror,-Wunused-but-set-variable] 932 | float *h_channel_coeffs = NULL; | ^ --- openair1/SIMULATION/NR_PHY/dlsim.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index d0afbba0d1..9203e73749 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -877,11 +877,13 @@ int main(int argc, char **argv) 0, 0); - float *h_channel_coeffs = NULL; +#ifdef ENABLE_CUDA + float *h_channel_coeffs = NULL; if (use_cuda) { int num_links = n_tx * n_rx; h_channel_coeffs = (float *)malloc(num_links * gNB2UE->channel_length * sizeof(float) * 2); } +#endif if (gNB2UE==NULL) { printf("Problem generating channel model. Exiting.\n"); exit(-1);