clang: fix warning about use of unitialized variable
authorØyvind Harboe <oyvind.harboe@zylin.com>
Wed, 26 Oct 2011 20:26:44 +0000 (22:26 +0200)
committerSpencer Oliver <spen@spen-soft.co.uk>
Wed, 26 Oct 2011 20:36:04 +0000 (20:36 +0000)
this was a false positive, silence it.

Change-Id: I432e0c466c94cf8fd6bbf0ea153c8501a8a261eb
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
Reviewed-on: http://openocd.zylin.com/126
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/target/arm_simulator.c

index 0a34cfcf4967fd207e6a2a84673b85aa7b9e1af4..1723b438deb16cba4a02bee2d111ee70ca6eb078 100644 (file)
@@ -519,7 +519,7 @@ static int arm_simulate_step_core(struct target *target,
        /* load register instructions */
        else if ((instruction.type >= ARM_LDR) && (instruction.type <= ARM_LDRSH))
        {
        /* load register instructions */
        else if ((instruction.type >= ARM_LDR) && (instruction.type <= ARM_LDRSH))
        {
-               uint32_t load_address = 0, modified_address = 0, load_value;
+               uint32_t load_address = 0, modified_address = 0, load_value = 0;
                uint32_t Rn = sim->get_reg_mode(sim, instruction.info.load_store.Rn);
 
                /* adjust Rn in case the PC is being read */
                uint32_t Rn = sim->get_reg_mode(sim, instruction.info.load_store.Rn);
 
                /* adjust Rn in case the PC is being read */