From 456f33cf3bc4bb14105627c26e4d69000262bba6 Mon Sep 17 00:00:00 2001 From: Paul Kienzle Date: Mon, 1 Jun 2026 21:59:24 -0400 Subject: [PATCH] remove 'unused step' warnings from kernels without pd --- sasmodels/kernel_iq.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sasmodels/kernel_iq.c b/sasmodels/kernel_iq.c index b8e3394be..b6604da4c 100644 --- a/sasmodels/kernel_iq.c +++ b/sasmodels/kernel_iq.c @@ -666,16 +666,15 @@ After expansion, the loop struction will look like the following: // ====== construct the loops ======= // Pointers to the start of the dispersity and weight vectors, if needed. +// The variable "step" is the current position in the dispersity loop. +// It will be incremented each time a new point in the mesh is accumulated, +// and used to test whether we have reached pd_stop. #if MAX_PD>0 pglobal const double *pd_value = values + NUM_VALUES; pglobal const double *pd_weight = pd_value + details->num_weights; + int step = pd_start; #endif -// The variable "step" is the current position in the dispersity loop. -// It will be incremented each time a new point in the mesh is accumulated, -// and used to test whether we have reached pd_stop. -int step = pd_start; - // *** define loops for each of 0, 1, 2, ..., modelinfo.MAX_PD-1 *** // define looping variables @@ -805,8 +804,8 @@ PD_OUTERMOST_WEIGHT(MAX_PD) } } // close nested loops -++step; #if MAX_PD>0 + ++step; PD_CLOSE(0) #endif #if MAX_PD>1