From: Wolfgang Denk Date: Tue, 08 Apr 2008 22:49:07 +0200 Subject: [U-Boot-Users] [U-boot] [PATCH] cmd_nand: Fix warning: dereferencing type-punned pointer will break strict-aliasing rules In-Reply-To: Your message of "Wed, 02 Apr 2008 13:37:50 +0200." <1207136270-19315-1-git-send-email-plagnioj@jcrosoft.com> Message-ID: <20080408204907.CE64E24842@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 <1207136270-19315-1-git-send-email-plagnioj@jcrosoft.com> you wrote: > cmd_nand.c:353: warning: dereferencing type-punned pointer will break strict-aliasing rules > cmd_nand.c:356: warning: dereferencing type-punned pointer will break strict-aliasing rules > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD > > diff --git a/common/cmd_nand.c b/common/cmd_nand.c > index 7b1f830..2906aed 100644 > --- a/common/cmd_nand.c > +++ b/common/cmd_nand.c > @@ -84,7 +84,7 @@ static int nand_dump(nand_info_t *nand, ulong off) > > /* ------------------------------------------------------------------------- */ > > -static inline int str2long(char *p, ulong *num) > +static inline int str2long(char *p, loff_t *num) We discussed this before. string-to-long converts into a "long" type, not into an offset type. 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 Above all else -- sky.