From 5de1d47ef5d44879e94e2f70423990cc7fbd94f9 Mon Sep 17 00:00:00 2001 From: Jonathan Peyton Date: Wed, 3 Jun 2015 19:31:39 +0000 Subject: Suppress uninitialized-variable-is-used warning in kmp_csupport.c The following change is needed to suppress the "variable 'retval' is used uninitialized whenever 'if' condition is false" warnings in runtime/src/kmp_csupport.c. This change just initializes 'retval' to 0. http://lists.cs.uiuc.edu/pipermail/openmp-dev/2015-June/000667.html Patch by Jack Howarth llvm-svn: 238954 --- openmp/runtime/src/kmp_csupport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openmp/runtime') diff --git a/openmp/runtime/src/kmp_csupport.c b/openmp/runtime/src/kmp_csupport.c index 5dc706a4ae3..f0cb4a85382 100644 --- a/openmp/runtime/src/kmp_csupport.c +++ b/openmp/runtime/src/kmp_csupport.c @@ -2431,7 +2431,7 @@ __kmpc_reduce_nowait( kmp_critical_name *lck ) { KMP_COUNT_BLOCK(REDUCE_nowait); - int retval; + int retval = 0; PACKED_REDUCTION_METHOD_T packed_reduction_method; #if OMP_40_ENABLED kmp_team_t *team; @@ -2629,7 +2629,7 @@ __kmpc_reduce( kmp_critical_name *lck ) { KMP_COUNT_BLOCK(REDUCE_wait); - int retval; + int retval = 0; PACKED_REDUCTION_METHOD_T packed_reduction_method; KA_TRACE( 10, ( "__kmpc_reduce() enter: called T#%d\n", global_tid ) ); -- cgit v1.2.3