]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board/fads/fads.c: Fix GCC 4.6 build warning
authorWolfgang Denk <wd@denx.de>
Fri, 4 Nov 2011 15:55:45 +0000 (15:55 +0000)
committerWolfgang Denk <wd@denx.de>
Mon, 7 Nov 2011 21:15:22 +0000 (22:15 +0100)
Fix:
fads.c: In function 'initdram':
fads.c:606:7: warning: variable 'base' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
board/fads/fads.c

index 9f7faaf47d7cef1f202fa7e6ce2347426e2dcd96..317d279603a017b2c54a8723a7170e35afa18d36 100644 (file)
@@ -603,15 +603,17 @@ static int initsdram(uint base, uint *noMbytes)
 phys_size_t initdram (int board_type)
 {
        uint sdramsz = 0;       /* size of sdram in Mbytes */
-       uint base = 0;          /* base of dram in bytes */
        uint m = 0;             /* size of dram in Mbytes */
 #ifndef CONFIG_MPC885ADS
+       uint base = 0;          /* base of dram in bytes */
        uint k, s;
 #endif
 
 #ifdef CONFIG_FADS
        if (!initsdram (0x00000000, &sdramsz)) {
+#ifndef CONFIG_MPC885ADS
                base = sdramsz << 20;
+#endif
                printf ("(%u MB SDRAM) ", sdramsz);
        }
 #endif