forked from OSchip/llvm-project
11e4c539f4
Summary: Two initialized local variables are causing clang to produce warnings: ``` ./src/projects/openmp/runtime/src/kmp_tasking.c:3019:5: error: variable 'num_tasks' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ ./src/projects/openmp/runtime/src/kmp_tasking.c:3027:21: note: uninitialized use occurs here for( i = 0; i < num_tasks; ++i ) { ^~~~~~~~~ ./src/projects/openmp/runtime/src/kmp_tasking.c:2968:28: note: initialize the variable 'num_tasks' to silence this warning kmp_uint64 i, num_tasks, extras; ^ = 0 ./src/projects/openmp/runtime/src/kmp_tasking.c:3019:5: error: variable 'extras' is used uninitialized whenever switch default is taken [-Werror,-Wsometimes-uninitialized] default: ^~~~~~~ ./src/projects/openmp/runtime/src/kmp_tasking.c:3022:52: note: uninitialized use occurs here KMP_DEBUG_ASSERT(tc == num_tasks * grainsize + extras); ^~~~~~ ./src/projects/openmp/runtime/src/kmp_debug.h:62:60: note: expanded from macro 'KMP_DEBUG_ASSERT' #define KMP_DEBUG_ASSERT( cond ) KMP_ASSERT( cond ) ^ ./src/projects/openmp/runtime/src/kmp_debug.h:60:51: note: expanded from macro 'KMP_ASSERT' #define KMP_ASSERT( cond ) ( (cond) ? 0 : __kmp_debug_assert( #cond, __FILE__, __LINE__ ) ) ^ ./src/projects/openmp/runtime/src/kmp_tasking.c:2968:36: note: initialize the variable 'extras' to silence this warning kmp_uint64 i, num_tasks, extras; ^ = 0 2 errors generated. ``` This patch initializes these two variables. Reviewers: tlwilmar, jlpeyton Subscribers: tlwilmar, openmp-commits Differential Revision: http://reviews.llvm.org/D17909 llvm-svn: 263316 |
||
---|---|---|
.. | ||
offload | ||
runtime | ||
testsuite | ||
www | ||
CMakeLists.txt | ||
CREDITS.txt | ||
LICENSE.txt |