From: Aurelien Jarno Date: Sat, 14 May 2011 23:00:20 +0000 (+0200) Subject: target-mips: Fix warning caused by unused local variable X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.1~1405^2~17^2~2161 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=99e43d366c8f036cd0489aace8d65afa13901676;p=sdk%2Femulator%2Fqemu.git target-mips: Fix warning caused by unused local variable Fix compilation with gcc-4.6, based on a patch from Stefan Weil . Signed-off-by: Aurelien Jarno --- diff --git a/target-mips/helper.c b/target-mips/helper.c index bdc1e53669..0f057c2171 100644 --- a/target-mips/helper.c +++ b/target-mips/helper.c @@ -272,8 +272,8 @@ int cpu_mips_handle_mmu_fault (CPUState *env, target_ulong address, int rw, #if !defined(CONFIG_USER_ONLY) target_phys_addr_t physical; int prot; -#endif int access_type; +#endif int ret = 0; #if 0 @@ -285,21 +285,19 @@ int cpu_mips_handle_mmu_fault (CPUState *env, target_ulong address, int rw, rw &= 1; /* data access */ +#if !defined(CONFIG_USER_ONLY) /* XXX: put correct access by using cpu_restore_state() correctly */ access_type = ACCESS_INT; -#if defined(CONFIG_USER_ONLY) - ret = TLBRET_NOMATCH; -#else ret = get_physical_address(env, &physical, &prot, address, rw, access_type); qemu_log("%s address=" TARGET_FMT_lx " ret %d physical " TARGET_FMT_plx " prot %d\n", __func__, address, ret, physical, prot); if (ret == TLBRET_MATCH) { - tlb_set_page(env, address & TARGET_PAGE_MASK, - physical & TARGET_PAGE_MASK, prot | PAGE_EXEC, - mmu_idx, TARGET_PAGE_SIZE); - ret = 0; + tlb_set_page(env, address & TARGET_PAGE_MASK, + physical & TARGET_PAGE_MASK, prot | PAGE_EXEC, + mmu_idx, TARGET_PAGE_SIZE); + ret = 0; } else if (ret < 0) #endif {