From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Mon, 05 Sep 2011 15:42:46 +0200 Subject: [U-Boot] [PATCH] i2c_no_probes: Fix initialization warnings In-Reply-To: <1315226172-20554-1-git-send-email-premi@ti.com> References: <1315226172-20554-1-git-send-email-premi@ti.com> Message-ID: <4E64D1D6.7040909@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 Hello Sanjeev, Sanjeev Premi wrote: > This patch fixes the initialization warnings similar to > the one below: > cmd_i2c.o cmd_i2c.c -c > cmd_i2c.c:109:1: warning: missing braces around initializer > cmd_i2c.c:109:1: warning: (near initialization for 'i2c_no_probes[0]') > > Signed-off-by: Sanjeev Premi > Cc: Albert ARIBAUD > --- > > The problem was originally found when compiling omap3_beagle[1]. > All the changes were done with this bash script: > > [script_here] > list=search.lst > [ -f ${list} ] && \rm -rf ${list} > > grep CONFIG_SYS_I2C_NOPROBES ./include/configs/* | grep -v "{{" | cut -d":" -f1 > ${list} > > for f in `cat ${list}` ; > do > echo "Fixing $f..." > sed -r -i 's/(CONFIG_SYS_I2C_NOPROBES\s*)\{{1}(.*)\}{1}/\1{{\2}}/g' "$f" > done > [/script_here] > > Compile tested for oma3_beagle only. Compiling for example for the alpr board with your patch: [hs at pollux u-boot]$ ./MAKEALL alpr Configuring for alpr board... cmd_i2c.c:115: warning: braces around scalar initializer cmd_i2c.c:115: warning: (near initialization for 'i2c_no_probes[0]') fpga.c:226: warning: initialization from incompatible pointer type text data bss dec hex filename 231746 18612 68328 318686 4dcde ./u-boot --------------------- SUMMARY ---------------------------- Boards compiled: 1 Boards with warnings or errors: 1 ( alpr ) ---------------------------------------------------------- [hs at pollux u-boot]$ -> so Sorry, NACK for this patch. bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany