projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fdbb945
)
powerpc/sstep: Avoid used uninitialized error
author
Michael Ellerman
<mpe@ellerman.id.au>
Fri, 1 Sep 2017 21:48:17 +0000
(07:48 +1000)
committer
Michael Ellerman
<mpe@ellerman.id.au>
Fri, 1 Sep 2017 22:04:26 +0000
(08:04 +1000)
Older compilers think val may be used uninitialized:
arch/powerpc/lib/sstep.c: In function 'emulate_loadstore':
arch/powerpc/lib/sstep.c:2758:23: error: 'val' may be used uninitialized in this function
We know better, but initialise val to 0 to avoid breaking the build.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/lib/sstep.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/powerpc/lib/sstep.c
b/arch/powerpc/lib/sstep.c
index 06dd61d8d48be0da3052053dae63b9aac44ecfcc..fb9f58b868e76ef0692e45fe874b6546cf74de37 100644
(file)
--- a/
arch/powerpc/lib/sstep.c
+++ b/
arch/powerpc/lib/sstep.c
@@
-2727,6
+2727,7
@@
int emulate_loadstore(struct pt_regs *regs, struct instruction_op *op)
if (!address_ok(regs, ea, size))
return -EFAULT;
err = 0;
+ val = 0;
switch (size) {
#ifdef __powerpc64__
case 1: