Skip to content

Commit 3b79b26

Browse files
committed
powerpc/sstep: Avoid used uninitialized error
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 <[email protected]>
1 parent fdbb945 commit 3b79b26

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/powerpc/lib/sstep.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2727,6 +2727,7 @@ int emulate_loadstore(struct pt_regs *regs, struct instruction_op *op)
27272727
if (!address_ok(regs, ea, size))
27282728
return -EFAULT;
27292729
err = 0;
2730+
val = 0;
27302731
switch (size) {
27312732
#ifdef __powerpc64__
27322733
case 1:

0 commit comments

Comments
 (0)