mirror of
https://git.proxmox.com/git/qemu
synced 2025-06-15 14:32:03 +00:00
cpu-exec: remove unnecessary assignment
Avoid this warning from clang analyzer: /src/qemu/cpu-exec.c:97:5: warning: Value stored to 'phys_page2' is never read phys_page2 = -1; Adjust the scope of the variable while at it. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
6115c0a82d
commit
337fc75870
@ -86,7 +86,7 @@ static TranslationBlock *tb_find_slow(CPUState *env,
|
|||||||
{
|
{
|
||||||
TranslationBlock *tb, **ptb1;
|
TranslationBlock *tb, **ptb1;
|
||||||
unsigned int h;
|
unsigned int h;
|
||||||
tb_page_addr_t phys_pc, phys_page1, phys_page2;
|
tb_page_addr_t phys_pc, phys_page1;
|
||||||
target_ulong virt_page2;
|
target_ulong virt_page2;
|
||||||
|
|
||||||
tb_invalidated_flag = 0;
|
tb_invalidated_flag = 0;
|
||||||
@ -94,7 +94,6 @@ static TranslationBlock *tb_find_slow(CPUState *env,
|
|||||||
/* find translated block using physical mappings */
|
/* find translated block using physical mappings */
|
||||||
phys_pc = get_page_addr_code(env, pc);
|
phys_pc = get_page_addr_code(env, pc);
|
||||||
phys_page1 = phys_pc & TARGET_PAGE_MASK;
|
phys_page1 = phys_pc & TARGET_PAGE_MASK;
|
||||||
phys_page2 = -1;
|
|
||||||
h = tb_phys_hash_func(phys_pc);
|
h = tb_phys_hash_func(phys_pc);
|
||||||
ptb1 = &tb_phys_hash[h];
|
ptb1 = &tb_phys_hash[h];
|
||||||
for(;;) {
|
for(;;) {
|
||||||
@ -107,6 +106,8 @@ static TranslationBlock *tb_find_slow(CPUState *env,
|
|||||||
tb->flags == flags) {
|
tb->flags == flags) {
|
||||||
/* check next page if needed */
|
/* check next page if needed */
|
||||||
if (tb->page_addr[1] != -1) {
|
if (tb->page_addr[1] != -1) {
|
||||||
|
tb_page_addr_t phys_page2;
|
||||||
|
|
||||||
virt_page2 = (pc & TARGET_PAGE_MASK) +
|
virt_page2 = (pc & TARGET_PAGE_MASK) +
|
||||||
TARGET_PAGE_SIZE;
|
TARGET_PAGE_SIZE;
|
||||||
phys_page2 = get_page_addr_code(env, virt_page2);
|
phys_page2 = get_page_addr_code(env, virt_page2);
|
||||||
|
Loading…
Reference in New Issue
Block a user