Skip to content

Commit b11fd76

Browse files
committed
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.
1 parent c1e2d6e commit b11fd76

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/gpuarray_reduction.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1772,9 +1772,9 @@ static int reduxCompile (redux_ctx* ctx){
17721772
*/
17731773

17741774
static int reduxSchedule (redux_ctx* ctx){
1775-
int i, priNdims, auxNdims;
1776-
uint64_t maxLgRdx, maxLgPre, maxLgPost;
1777-
uint64_t maxLgPri, maxLgAux;
1775+
int i, priNdims = 0, auxNdims = 0;
1776+
uint64_t maxLgRdx = 0, maxLgPre = 0, maxLgPost = 0;
1777+
uint64_t maxLgPri = 0, maxLgAux = 0;
17781778
uint64_t maxLs [MAX_HW_DIMS];
17791779
uint64_t maxGg;
17801780
uint64_t maxGs [MAX_HW_DIMS];

0 commit comments

Comments
 (0)