diff options
author | Vitaliy Ivanov <vitalivanov@gmail.com> | 2011-07-07 08:10:31 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-09-15 08:23:07 -0400 |
commit | 7cfdaf38d4975b0266fbdef971e5ce37da7214fd (patch) | |
tree | d1d211b4934509261e23a77595a6b7a86b8df162 /kernel/futex.c | |
parent | 124ff4e53ace98300bf7465e0285167a3df838d3 (diff) |
futex: uninitialized warning corrections
The variables here are really not used uninitialized.
kernel/futex.c: In function 'fixup_pi_state_owner.clone.17':
kernel/futex.c:1582:6: warning: 'curval' may be used uninitialized in this function
kernel/futex.c: In function 'handle_futex_death':
kernel/futex.c:2486:6: warning: 'nval' may be used uninitialized in this function
kernel/futex.c: In function 'do_futex':
kernel/futex.c:863:11: warning: 'curval' may be used uninitialized in this function
kernel/futex.c:828:6: note: 'curval' was declared here
kernel/futex.c:898:5: warning: 'oldval' may be used uninitialized in this function
kernel/futex.c:890:6: note: 'oldval' was declared here
Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'kernel/futex.c')
-rw-r--r-- | kernel/futex.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/futex.c b/kernel/futex.c index 0a308970c24a..f4e811c8623c 100644 --- a/kernel/futex.c +++ b/kernel/futex.c | |||
@@ -825,7 +825,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this) | |||
825 | { | 825 | { |
826 | struct task_struct *new_owner; | 826 | struct task_struct *new_owner; |
827 | struct futex_pi_state *pi_state = this->pi_state; | 827 | struct futex_pi_state *pi_state = this->pi_state; |
828 | u32 curval, newval; | 828 | u32 uninitialized_var(curval), newval; |
829 | 829 | ||
830 | if (!pi_state) | 830 | if (!pi_state) |
831 | return -EINVAL; | 831 | return -EINVAL; |
@@ -887,7 +887,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this) | |||
887 | 887 | ||
888 | static int unlock_futex_pi(u32 __user *uaddr, u32 uval) | 888 | static int unlock_futex_pi(u32 __user *uaddr, u32 uval) |
889 | { | 889 | { |
890 | u32 oldval; | 890 | u32 uninitialized_var(oldval); |
891 | 891 | ||
892 | /* | 892 | /* |
893 | * There is no waiter, so we unlock the futex. The owner died | 893 | * There is no waiter, so we unlock the futex. The owner died |
@@ -1546,7 +1546,7 @@ static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q, | |||
1546 | u32 newtid = task_pid_vnr(newowner) | FUTEX_WAITERS; | 1546 | u32 newtid = task_pid_vnr(newowner) | FUTEX_WAITERS; |
1547 | struct futex_pi_state *pi_state = q->pi_state; | 1547 | struct futex_pi_state *pi_state = q->pi_state; |
1548 | struct task_struct *oldowner = pi_state->owner; | 1548 | struct task_struct *oldowner = pi_state->owner; |
1549 | u32 uval, curval, newval; | 1549 | u32 uval, uninitialized_var(curval), newval; |
1550 | int ret; | 1550 | int ret; |
1551 | 1551 | ||
1552 | /* Owner died? */ | 1552 | /* Owner died? */ |
@@ -2451,7 +2451,7 @@ err_unlock: | |||
2451 | */ | 2451 | */ |
2452 | int handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi) | 2452 | int handle_futex_death(u32 __user *uaddr, struct task_struct *curr, int pi) |
2453 | { | 2453 | { |
2454 | u32 uval, nval, mval; | 2454 | u32 uval, uninitialized_var(nval), mval; |
2455 | 2455 | ||
2456 | retry: | 2456 | retry: |
2457 | if (get_user(uval, uaddr)) | 2457 | if (get_user(uval, uaddr)) |