From 7aff01f78150c36bc230a170a7f69b51841f4199 Mon Sep 17 00:00:00 2001 From: Olexa Bilaniuk Date: Sun, 5 Mar 2017 01:43:37 -0500 Subject: [PATCH] Muzzle incorrect GCC maybe-uninitialized diagnostic. Clang and MSVC correctly recognize that all paths to the allegedly- uninitialized variables are, in fact, dominated by their initialization. --- src/gpuarray_reduction.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gpuarray_reduction.c b/src/gpuarray_reduction.c index 840f038198..c9ccae66c4 100644 --- a/src/gpuarray_reduction.c +++ b/src/gpuarray_reduction.c @@ -1772,9 +1772,9 @@ static int reduxCompile (redux_ctx* ctx){ */ static int reduxSchedule (redux_ctx* ctx){ - int i, priNdims, auxNdims; - uint64_t maxLgRdx, maxLgPre, maxLgPost; - uint64_t maxLgPri, maxLgAux; + int i, priNdims = 0, auxNdims = 0; + uint64_t maxLgRdx = 0, maxLgPre = 0, maxLgPost = 0; + uint64_t maxLgPri = 0, maxLgAux = 0; uint64_t maxLs [MAX_HW_DIMS]; uint64_t maxGg; uint64_t maxGs [MAX_HW_DIMS];