public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] lib: zlib_inflate "r.base" uninitialized compile warnings
@ 2005-12-25 20:08 James Lamanna
  2005-12-25 20:35 ` Kees Cook
  0 siblings, 1 reply; 6+ messages in thread
From: James Lamanna @ 2005-12-25 20:08 UTC (permalink / raw)
  To: kees; +Cc: linux-kernel, trivial

Kees Cook wrote:

> Eliminates compile-time warnings from "r" being uninitialized.
>

What version of gcc are you using?

I get no warnings on 3.4.4:
  CC [M]  lib/zlib_inflate/infblock.o
  CC [M]  lib/zlib_inflate/infcodes.o
  CC [M]  lib/zlib_inflate/inffast.o
  CC [M]  lib/zlib_inflate/inflate.o
  CC [M]  lib/zlib_inflate/inflate_sync.o
  CC [M]  lib/zlib_inflate/inftrees.o
  CC [M]  lib/zlib_inflate/infutil.o
  CC [M]  lib/zlib_inflate/inflate_syms.o
  LD [M]  lib/zlib_inflate/zlib_inflate.o
  Building modules, stage 2.
  MODPOST
  CC      lib/zlib_inflate/zlib_inflate.mod.o
  LD [M]  lib/zlib_inflate/zlib_inflate.ko

agard linux-2.6.15-rc7 # gcc --version
gcc (GCC) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)

Looks like a gcc bug that was fixed?

^ permalink raw reply	[flat|nested] 6+ messages in thread
* [PATCH] lib: zlib_inflate "r.base" uninitialized compile warnings
@ 2005-12-25 18:07 Kees Cook
  2005-12-25 18:34 ` Al Viro
  0 siblings, 1 reply; 6+ messages in thread
From: Kees Cook @ 2005-12-25 18:07 UTC (permalink / raw)
  To: trivial; +Cc: linux-kernel

Eliminates compile-time warnings from "r" being uninitialized.

Signed-of-by: Kees Cook <kees@outflux.net>

---

--- linux-2.6.15-rc7/lib/zlib_inflate/inftrees.c.orig	2005-12-25 09:51:01.000000000 -0800
+++ linux-2.6.15-rc7/lib/zlib_inflate/inftrees.c	2005-12-25 09:46:06.000000000 -0800
@@ -196,6 +196,7 @@ static int huft_build(
   u[0] = NULL;                  /* just to keep compilers happy */
   q = NULL;                     /* ditto */
   z = 0;                        /* ditto */
+  r.word.pad = r.base = 0;      /* ditto */
 
   /* go through the bit lengths (k already is bits in shortest code) */
   for (; k <= g; k++)


-- 
Kees Cook                                            @outflux.net

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-12-25 20:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-25 20:08 [PATCH] lib: zlib_inflate "r.base" uninitialized compile warnings James Lamanna
2005-12-25 20:35 ` Kees Cook
2005-12-25 20:43   ` Al Viro
  -- strict thread matches above, loose matches on Subject: below --
2005-12-25 18:07 Kees Cook
2005-12-25 18:34 ` Al Viro
2005-12-25 20:39   ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox