From owner-freebsd-bugs Thu Feb 28 9:10:13 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 5B95137B41A for ; Thu, 28 Feb 2002 09:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g1SHA1u74216; Thu, 28 Feb 2002 09:10:01 -0800 (PST) (envelope-from gnats) Received: from melchior.cuivre.fr.eu.org (melchior.enst.fr [137.194.161.6]) by hub.freebsd.org (Postfix) with ESMTP id 6EAC037B405 for ; Thu, 28 Feb 2002 09:09:52 -0800 (PST) Received: from melusine.cuivre.fr.eu.org (melusine.enst.fr [137.194.160.34]) by melchior.cuivre.fr.eu.org (Postfix) with ESMTP id B5D328438 for ; Thu, 28 Feb 2002 18:09:50 +0100 (CET) Received: by melusine.cuivre.fr.eu.org (Postfix, from userid 1000) id 94E512C3D1; Thu, 28 Feb 2002 18:09:49 +0100 (CET) Message-Id: <20020228170949.94E512C3D1@melusine.cuivre.fr.eu.org> Date: Thu, 28 Feb 2002 18:09:49 +0100 (CET) From: Thomas Quinot Reply-To: Thomas Quinot To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: kern/35408: es137x.c warning causes buildkernel failure [patch] Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 35408 >Category: kern >Synopsis: es137x.c warning causes buildkernel failure [patch] >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Feb 28 09:10:01 PST 2002 >Closed-Date: >Last-Modified: >Originator: Thomas Quinot >Release: FreeBSD 5.0-CURRENT i386 >Organization: >Environment: System: FreeBSD shalmaneser.enst.fr 5.0-CURRENT FreeBSD 5.0-CURRENT #3: Tue Feb 5 19:14:04 CET 2002 quinot@shalmaneser.enst.fr:/usr/obj/usr/src/sys/SHALMANESER i386 Compiler: gcc 2.95.3. >Description: es137x.c generates a warning. Since -Werror is enabled by default, this causes buildkernel to fail: cc -c -O2 -pipe -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -fformat-extensions -ansi -g -nostdinc -I- -I. -I/usr/src/sys -I/usr/src/sys/dev -I/usr/src/sys/contrib/dev/acpica -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/../include -D_KERNEL -ffreestanding -include opt_global.h -fno-common -elf -mpreferred-stack-boundary=2 -Werror /usr/src/sys/dev/sound/pci/es137x.c cc1: warnings being treated as errors /usr/src/sys/dev/sound/pci/es137x.c: In function `es1371_rdcd': /usr/src/sys/dev/sound/pci/es137x.c:598: warning: `x' might be used uninitialized in this function The warning is irrelevant because the variable is actually always assigned to before use. >How-To-Repeat: make buildkernel on a freshly cvsupped tree. >Fix: --- es137x.c Wed Oct 10 14:57:55 2001 +++ es137x.c.fixed Thu Feb 28 17:59:45 2002 @@ -595,7 +595,7 @@ es1371_rdcd(kobj_t obj, void *s, int addr) { int sl; - unsigned t, x; + unsigned t, x = 0; struct es_info *es = (struct es_info *)s; if (debug > 0) printf("rdcodec addr 0x%x ... ", addr); >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message