From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 15 Jul 2013 01:32:50 +0200 Subject: [U-Boot] [PATCH] ppc: mpc8323erdb: Fix compiler warning In-Reply-To: <20130714174348.B7BF7380DFF@gemini.denx.de> References: <1373710940-15779-1-git-send-email-marex@denx.de> <20130714174348.B7BF7380DFF@gemini.denx.de> Message-ID: <201307150132.50811.marex@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 Wolfgang, > Dear Marek Vasut, > > In message <1373710940-15779-1-git-send-email-marex@denx.de> you wrote: > > Fix the following warning: > > > > mpc8323erdb.c: In function 'mac_read_from_eeprom': > > mpc8323erdb.c:198:3: warning: dereferencing type-punned pointer will > > break strict-aliasing rules [-Wstrict-aliasing] > > > > if (crc32(crc, buf, 24) == *(unsigned int *)&buf[24]) { > > ^ > > > > Size remains unchanged after and before fix: > > text data bss dec hex filename > > > > 206977 18748 23344 249069 3cced ./u-boot > > > > Note the fix is the crudest possible, but also least intrusive. > > Please see Timur's review comments to my original patch for this > isssue ([1]). The "unsigned int" should indeed be fixed. > > I resubmitted a v2 with the review comments incorporated on July 08, > see [2], but I caught only one part of the needed changes. V3 sent > right now; see [3]. I'd rather see this added than yours. OK, I didn't know you were at it. > Also note that it might be a good idea to add the MPC83xx custodion to > the Cc: list of such patches... Yes, I only added the board maintainer, who's apparently no longer at FSL :( > [1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/163386 > [2] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/165266 > [3] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/165731 Best regards, Marek Vasut