From: Wolfgang Denk Date: Wed, 30 Jul 2008 12:19:12 +0200 Subject: [U-Boot-Users] [PATCH] cmd_bdinfo: Fix printf() format warning In-Reply-To: Your message of "Wed, 30 Jul 2008 10:35:53 +0200." <1217406953-11089-1-git-send-email-haavard.skinnemoen@atmel.com> Message-ID: <20080730101912.9F86D248A5@gemini.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 In message <1217406953-11089-1-git-send-email-haavard.skinnemoen@atmel.com> you wrote: > Fix the following warning on avr32 and, from the looks of it, all other > architectures except arm, blackfin and mips. > > cmd_bdinfo.c: In function 'do_bdinfo': > cmd_bdinfo.c:367: warning: format '%d' expects type 'int', but argument > 2 has type 'long unsigned int' > > In order to not introduce new warnings on the aforementioned three > architectures as well as i386, I added a cast to unsigned long. This > should be safe even if bi_baudrate is declared as 'int' (assuming > there's no such thing as negative baud rates.) Instead of the cast, should we not rather fix ARM, BF and MIPS to use ulong like anybody else? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de We Klingons believe as you do -- the sick should die. Only the strong should live. -- Kras, "Friday's Child", stardate 3497.2