]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
drivers/bios_emulator: Fix gcc 4.4 compiler warning
authorKumar Gala <galak@kernel.crashing.org>
Mon, 13 Jul 2009 14:23:59 +0000 (09:23 -0500)
committerWolfgang Denk <wd@denx.de>
Thu, 23 Jul 2009 19:03:33 +0000 (21:03 +0200)
biosemu.c: In function 'BE_setVGA':
biosemu.c:147: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
drivers/bios_emulator/biosemu.c

index d0c652157782c0e1f4c533cb116d94ae7a86c55d..cfa836caf899bc4a6447eb9ea08b8a67670bf849 100644 (file)
@@ -144,7 +144,8 @@ void X86API BE_setVGA(BE_VGAInfo * info)
                _BE_env.biosmem_base = _BE_env.busmem_base + 0x20000;
                _BE_env.biosmem_limit = 0xC7FFF;
        }
-       if (*((u32 *) info->LowMem) == 0)
+       if ((info->LowMem[0] == 0) && (info->LowMem[1] == 0) &&
+           (info->LowMem[2] == 0) && (info->LowMem[3] == 0))
                _BE_bios_init((u32 *) info->LowMem);
        memcpy((u8 *) M.mem_base, info->LowMem, sizeof(info->LowMem));
 }