[Openmp-commits] [openmp] r238954 - Suppress uninitialized-variable-is-used warning in kmp_csupport.c
Jonathan Peyton
jonathan.l.peyton at intel.com
Wed Jun 3 12:31:40 PDT 2015
Author: jlpeyton
Date: Wed Jun 3 14:31:39 2015
New Revision: 238954
URL: http://llvm.org/viewvc/llvm-project?rev=238954&view=rev
Log:
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
Modified:
openmp/trunk/runtime/src/kmp_csupport.c
Modified: openmp/trunk/runtime/src/kmp_csupport.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/kmp_csupport.c?rev=238954&r1=238953&r2=238954&view=diff
==============================================================================
--- openmp/trunk/runtime/src/kmp_csupport.c (original)
+++ openmp/trunk/runtime/src/kmp_csupport.c Wed Jun 3 14:31:39 2015
@@ -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 ) );
More information about the Openmp-commits
mailing list