Skip to content

Commit

Permalink
Muzzle incorrect GCC maybe-uninitialized diagnostic.
Browse files Browse the repository at this point in the history
Clang and MSVC correctly recognize that all paths to the allegedly-
uninitialized variables are, in fact, dominated by their initialization.
  • Loading branch information
obilaniu committed Jun 10, 2017
1 parent f0a7de6 commit a0489a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gpuarray_reduction.c
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit a0489a1

Please sign in to comment.