From patchwork Mon Sep 26 00:26:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 116334 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id AFC57B6F7B for ; Mon, 26 Sep 2011 10:26:44 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 46CCD28336; Mon, 26 Sep 2011 02:26:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ezHi84KXkYpe; Mon, 26 Sep 2011 02:26:34 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A105E28279; Mon, 26 Sep 2011 02:26:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9774D281C6 for ; Mon, 26 Sep 2011 02:26:15 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qEnNllYrdRFZ for ; Mon, 26 Sep 2011 02:26:14 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by theia.denx.de (Postfix) with ESMTPS id 9E8B728266 for ; Mon, 26 Sep 2011 02:26:14 +0200 (CEST) Received: by fxd18 with SMTP id 18so5006722fxd.3 for ; Sun, 25 Sep 2011 17:26:14 -0700 (PDT) Received: by 10.223.51.69 with SMTP id c5mr4094252fag.136.1316996774360; Sun, 25 Sep 2011 17:26:14 -0700 (PDT) Received: from mashiro.ms.mff.cuni.cz (eduroam32.ms.mff.cuni.cz. [195.113.21.32]) by mx.google.com with ESMTPS id w6sm18285342fah.0.2011.09.25.17.26.13 (version=SSLv3 cipher=OTHER); Sun, 25 Sep 2011 17:26:14 -0700 (PDT) From: Marek Vasut To: u-boot@lists.denx.de Date: Mon, 26 Sep 2011 02:26:04 +0200 Message-Id: <1316996766-14248-5-git-send-email-marek.vasut@gmail.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1316996766-14248-1-git-send-email-marek.vasut@gmail.com> References: <1316996766-14248-1-git-send-email-marek.vasut@gmail.com> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 5/7] GCC4.6: Squash warnings in lcd.c X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- common/lcd.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/common/lcd.c b/common/lcd.c index 0555ab4..d9cb8ca 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -211,10 +211,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; @@ -614,7 +617,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) @@ -632,7 +634,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);