summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Peyton <jonathan.l.peyton@intel.com>2015-06-03 19:31:39 +0000
committerJonathan Peyton <jonathan.l.peyton@intel.com>2015-06-03 19:31:39 +0000
commit5de1d47ef5d44879e94e2f70423990cc7fbd94f9 (patch)
treeb72442c60fcca9515a41c66c224ecd6b77c55041
parentf9d009b755fd4b1280902664bf347d4e935f7822 (diff)
downloadbcm5719-llvm-5de1d47ef5d44879e94e2f70423990cc7fbd94f9.tar.gz
bcm5719-llvm-5de1d47ef5d44879e94e2f70423990cc7fbd94f9.zip
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
-rw-r--r--openmp/runtime/src/kmp_csupport.c4
1 files changed, 2 insertions, 2 deletions
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 ) );
OpenPOWER on IntegriCloud