GCC4.6: Squash warnings in lcd.c 38/159138/1
authorMarek Vasut <marek.vasut@gmail.com>
Mon, 26 Sep 2011 00:26:04 +0000 (02:26 +0200)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 7 Nov 2017 06:48:03 +0000 (15:48 +0900)
lcd.c: In function ‘lcd_drawchars’:
lcd.c:214:9: warning: variable ‘off’ set but not used
[-Wunused-but-set-variable]
lcd.c: In function ‘lcd_display_bitmap’:
lcd.c:617:16: warning: variable ‘compression’ set but not used
[-Wunused-but-set-variable]

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
[sw0312.kim: cherry-pick from mainline commit be547c6db32d to fix build warning]
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
Change-Id: I09ae696ae78c82a8761b4ef15befa6f55eddbcc4

common/lcd.c

index ad334ce..134004f 100644 (file)
@@ -221,10 +221,13 @@ void lcd_printf(const char *fmt, ...)
 static void lcd_drawchars (ushort x, ushort y, uchar *str, int count)
 {
        uchar *dest;
-       ushort off, row;
+       ushort row;
+
+#if LCD_BPP == LCD_MONOCHROME
+       ushort off  = x * (1 << LCD_BPP) % 8;
+#endif
 
        dest = (uchar *)(lcd_base + y * lcd_line_length + x * (1 << LCD_BPP) / 8);
-       off  = x * (1 << LCD_BPP) % 8;
 
        for (row=0;  row < VIDEO_FONT_HEIGHT;  ++row, dest += lcd_line_length)  {
                uchar *s = str;
@@ -706,7 +709,6 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
        unsigned long width, height, byte_width;
        unsigned long pwidth = panel_info.vl_col;
        unsigned colors, bpix, bmp_bpix;
-       unsigned long compression;
 #if defined CONFIG_PXA250 || defined CONFIG_PXA27X || defined CONFIG_CPU_MONAHANS
        struct pxafb_info *fbi = &panel_info.pxa;
 #elif defined(CONFIG_MPC823)
@@ -724,7 +726,6 @@ int lcd_display_bitmap(ulong bmp_image, int x, int y)
        height = le32_to_cpu (bmp->header.height);
        bmp_bpix = le16_to_cpu(bmp->header.bit_count);
        colors = 1 << bmp_bpix;
-       compression = le32_to_cpu (bmp->header.compression);
 
        bpix = NBITS(panel_info.vl_bpix);