From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Sun, 30 Oct 2011 23:19:23 +0100 Subject: [U-Boot] [PATCH 12/18] GCC4.6: Squash warnings in smsc95xx.c In-Reply-To: <20111030220344.79B83180985A@gemini.denx.de> References: <1319535604-20831-1-git-send-email-marek.vasut@gmail.com> <201110302148.50367.marek.vasut@gmail.com> <20111030220344.79B83180985A@gemini.denx.de> Message-ID: <201110302319.23973.marek.vasut@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > Dear Marek Vasut, > > In message <201110302148.50367.marek.vasut@gmail.com> you wrote: > > > > - addr_lo = cpu_to_le32(*((u32 *)eth->enetaddr)); > > > > + addr_lo = cpu_to_le32(*eth->enetaddr); > > > > > > pretty sure this is wrong. enetaddr is a uchar[], so your code now > > > reads only 1 byte instead of 4. > > > > > > that said, this code also seems to not be endian safe ... > > > -mike > > > > It's good anyone actually cares to properly review. Anyway, why does > > noone actually care to fix all the damn warnings in their drivers before > > submitting them in the first place ?! > > GCC 4.6 has not been around that long. Many people use less > bleading-edge tool chains - for a good reason. The problem is I saw this warning with gcc 4.2 too :-( Cheers