diff mbox

[12/22] ppc: avoid a warning with the next patch

Message ID CAAu8pHti4gXPnouFTuJY7nZjstVAWnh_0vi3f7gNOtB5g8Y5fw@mail.gmail.com
State New
Headers show

Commit Message

Blue Swirl April 22, 2012, 1:24 p.m. UTC
When the code is moved together by the next patch, compiler
detects a possible uninitialized variable use. Avoid the warning
by initializing the variables.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
---
 target-ppc/mmu_helper.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

         helper_raise_exception_err(env, POWERPC_EXCP_PROGRAM,
@@ -100,7 +100,7 @@ target_ulong helper_load_slb_esid(CPUPPCState
*env, target_ulong rb)

 target_ulong helper_load_slb_vsid(CPUPPCState *env, target_ulong rb)
 {
-    target_ulong rt;
+    target_ulong rt = 0;

     if (ppc_load_slb_vsid(env, rb, &rt) < 0) {
         helper_raise_exception_err(env, POWERPC_EXCP_PROGRAM,
diff mbox

Patch

diff --git a/target-ppc/mmu_helper.c b/target-ppc/mmu_helper.c
index 7bd6230..e79b8f2 100644
--- a/target-ppc/mmu_helper.c
+++ b/target-ppc/mmu_helper.c
@@ -89,7 +89,7 @@  void helper_store_slb(CPUPPCState *env, target_ulong
rb, target_ulong rs)

 target_ulong helper_load_slb_esid(CPUPPCState *env, target_ulong rb)
 {
-    target_ulong rt;
+    target_ulong rt = 0;

     if (ppc_load_slb_esid(env, rb, &rt) < 0) {