From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Wed, 21 Nov 2012 11:37:52 -0500 Subject: [U-Boot] [PATCH v2 13/25] lib/zlib: sparse fixes In-Reply-To: <20121108190631.78079741e2eccb38612d32f0@freescale.com> References: <1351553687-12469-1-git-send-email-kim.phillips@freescale.com> <1351553687-12469-14-git-send-email-kim.phillips@freescale.com> <20121108112051.B06012002F4@gemini.denx.de> <20121108190631.78079741e2eccb38612d32f0@freescale.com> Message-ID: <20121121163752.GA5721@oliver-linux> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thu, Nov 08, 2012 at 07:06:31PM -0600, Kim Phillips wrote: > On Thu, 8 Nov 2012 12:20:51 +0100 > Wolfgang Denk wrote: > > > In message <1351553687-12469-14-git-send-email-kim.phillips@freescale.com> you wrote: > > > define Z_NULL to (void *)0 include/u-boot/zlib.h to get rid of most of > > > the NULL pointer warnings. > > ... > > > -#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ > > > +#define Z_NULL (void *)0 /* for initializing zalloc, zfree, opaque */ > > > > Don't we have to put parens around such an expression? > > I suppose. > > > > --- a/lib/zlib/adler32.c > > > +++ b/lib/zlib/adler32.c > > > @@ -54,10 +54,7 @@ > > > #endif > > > > > > /* ========================================================================= */ > > > -uLong ZEXPORT adler32(adler, buf, len) > > > - uLong adler; > > > - const Bytef *buf; > > > - uInt len; > > > +uLong ZEXPORT adler32(uLong adler, const Bytef *buf, uInt len) > > > > Hm... this code has been imported from another project. This > > modification makes updates (or even comparing what has changed in more > > recent versions) much mor difficult, or even impossible > > :-( > > my goal is to improve u-boot code quality by eliminating as much > sparse noise as possible - most boards use this code to decompress > kernels, so it's widely used. E.g., this patch removes 52 lines of > sparse output. But ok, we can revert this patch and turn off > checking for these files, in the form of an #ifndef __CHECKER__ at > the top, with an 'imported from another project' justification > comment. Would that be better? My memory could be faulty here, but can't we rely on the kernel here? That'll give us sparse-clean zlib, or hints on how they're keeping it in sync. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: