Samuel Antao
11e4c539f4
Initialize two variables in kmp_tasking.
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
2016-03-12 00:55:17 +00:00
..
2015-11-30 20:02:59 +00:00
2016-02-25 18:49:52 +00:00
2015-08-31 12:32:55 +00:00
2016-02-04 19:29:35 +00:00
2016-03-02 22:47:51 +00:00
2016-01-04 23:20:26 +00:00
2015-04-02 13:27:08 +00:00
2016-01-12 17:21:55 +00:00
2015-11-30 20:02:59 +00:00
2015-09-25 17:23:17 +00:00
2015-06-03 16:23:36 +00:00
2015-09-21 18:11:22 +00:00
2016-01-27 20:57:32 +00:00
2015-08-11 21:36:41 +00:00
2016-01-04 23:20:26 +00:00
2016-03-03 21:21:05 +00:00
2015-01-27 17:13:53 +00:00
2015-06-11 17:36:16 +00:00
2015-09-21 17:24:46 +00:00
2015-07-09 18:16:58 +00:00
2016-03-02 22:42:06 +00:00
2015-09-21 19:37:05 +00:00
2015-01-27 17:13:53 +00:00
2015-06-08 20:01:14 +00:00
2015-02-20 18:05:17 +00:00
2015-05-26 17:32:53 +00:00
2016-02-25 18:49:52 +00:00
2015-01-27 17:13:53 +00:00
2016-02-25 18:49:52 +00:00
2015-01-27 17:13:53 +00:00
2016-02-25 18:04:09 +00:00
2016-02-09 07:07:30 +00:00
2015-06-01 02:37:28 +00:00
2015-05-22 22:35:51 +00:00
2015-06-01 02:37:28 +00:00
2015-04-02 13:27:08 +00:00
2015-01-27 17:13:53 +00:00
2015-08-28 18:42:10 +00:00
2015-02-20 18:05:17 +00:00
2015-12-03 19:37:20 +00:00
2016-01-22 19:16:14 +00:00
2015-12-11 22:04:05 +00:00
2015-09-21 17:24:46 +00:00
2016-01-04 23:20:26 +00:00
2016-01-04 23:20:26 +00:00
2016-03-02 22:42:06 +00:00
2015-07-09 18:20:51 +00:00
2016-02-25 17:55:50 +00:00
2016-02-25 18:04:09 +00:00
2015-01-27 17:13:53 +00:00
2015-12-17 17:27:51 +00:00
2015-12-18 16:19:35 +00:00
2016-03-11 20:20:49 +00:00
2016-03-11 20:23:05 +00:00
2015-06-08 20:01:14 +00:00
2015-04-02 13:27:08 +00:00
2015-05-22 22:35:51 +00:00
2015-01-27 17:13:53 +00:00
2016-01-28 23:10:44 +00:00
2016-03-12 00:55:17 +00:00
2015-06-08 20:01:14 +00:00
2015-04-02 13:27:08 +00:00
2015-06-08 20:01:14 +00:00
2016-01-27 21:02:04 +00:00
2015-06-01 02:37:28 +00:00
2015-01-27 17:13:53 +00:00
2016-01-11 20:28:55 +00:00
2015-01-27 17:13:53 +00:00
2015-09-21 20:02:45 +00:00
2016-03-02 22:47:51 +00:00
2015-08-28 18:42:10 +00:00
2016-01-28 10:39:52 +00:00
2015-11-11 17:30:26 +00:00
2016-01-28 10:39:52 +00:00
2015-10-29 20:56:24 +00:00
2015-11-05 16:54:55 +00:00
2014-10-07 16:25:50 +00:00
2015-08-28 18:42:10 +00:00
2016-01-27 21:02:04 +00:00
2016-01-27 21:02:04 +00:00
2015-04-29 16:42:24 +00:00
2015-03-10 09:03:42 +00:00