From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Mon, 24 Oct 2011 14:15:35 +0200 Subject: [U-Boot] [PATCH 02/39] GCC4.6: Squash warnings in common/usb.c In-Reply-To: <1319242654-15534-3-git-send-email-marek.vasut@gmail.com> References: <1319242654-15534-1-git-send-email-marek.vasut@gmail.com> <1319242654-15534-3-git-send-email-marek.vasut@gmail.com> Message-ID: <4EA556E7.7010504@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10/22/2011 02:16 AM, Marek Vasut wrote: > usb.c: In function ?usb_parse_config?: > usb.c:331:17: warning: variable ?ch? set but not used > [-Wunused-but-set-variable] > usb.c: In function ?usb_hub_port_connect_change?: > usb.c:1123:29: warning: variable ?portchange? set but not used > [-Wunused-but-set-variable] > usb.c: In function ?usb_hub_configure?: > usb.c:1183:25: warning: variable ?hubsts? set but not used > [-Wunused-but-set-variable] > > Signed-off-by: Marek Vasut > Cc: Wolfgang Denk > Cc: Simon Glass > Cc: Mike Frysinger > --- > common/usb.c | 21 +++++++-------------- > 1 files changed, 7 insertions(+), 14 deletions(-) > > diff --git a/common/usb.c b/common/usb.c > index 2cd50db..bed5116 100644 > --- a/common/usb.c > +++ b/common/usb.c > @@ -56,16 +56,16 @@ > #endif > > #ifdef DEBUG > -#define USB_DEBUG > -#define USB_HUB_DEBUG > -#endif > - > -#ifdef USB_DEBUG > -#define USB_PRINTF(fmt, args...) printf(fmt , ##args) > +#define USB_DEBUG 1 > +#define USB_HUB_DEBUG 1 Why do you nedd to set a value when then later to check only with #ifdef if it is defined or not ? > #else > -#define USB_PRINTF(fmt, args...) > +#define USB_DEBUG 0 > +#define USB_HUB_DEBUG 0 Maybe #undef ? Best regards, Stefano babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================