From owner-freebsd-ports-bugs@FreeBSD.ORG Fri Dec 30 03:00:39 2011 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A0451065696 for ; Fri, 30 Dec 2011 03:00:39 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 583A98FC12 for ; Fri, 30 Dec 2011 03:00:39 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pBU30ddO008381 for ; Fri, 30 Dec 2011 03:00:39 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pBU30dA6008375; Fri, 30 Dec 2011 03:00:39 GMT (envelope-from gnats) Date: Fri, 30 Dec 2011 03:00:39 GMT Message-Id: <201112300300.pBU30dA6008375@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: moto kawasaki Cc: Subject: Re: ports/163084: net-mgmt/bsnmptools fails to build X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: moto kawasaki List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2011 03:00:39 -0000 The following reply was made to PR ports/163084; it has been noted by GNATS. From: moto kawasaki To: bug-followup@FreeBSD.org Cc: Subject: Re: ports/163084: net-mgmt/bsnmptools fails to build Date: Fri, 30 Dec 2011 11:51:34 +0900 (JST) Hi, I'd report quick patch for uninitialized variable 'value' problem. The problem reported in ports/163084 was reproduced in my environment. (cd /usr/ports && make update has done in a few days ago) ================================================== # uname -srm FreeBSD 8.2-RELEASE-p5 amd64 # pwd /usr/ports/net-mgmt/bsnmptools/work/bsnmptools/lib # make Warning: Object directory not changed from original /usr/ports/net-mgmt/bsnmptools/work/bsnmptools/lib cc -O2 -fno-strict-aliasing -pipe -march=nocona -std=gnu99 -fstack-protector -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wcast-align -Wunused-parameter -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wno-pointer-sign -c bsnmptools.c cc1: warnings being treated as errors bsnmptools.c: In function 'parse_include': bsnmptools.c:399: warning: 'value' may be used uninitialized in this function *** Error code 1 Stop in /usr/ports/net-mgmt/bsnmptools/work/bsnmptools/lib. ================================================== Now, this 'value' can be initialized in getsubopt1() in the same source file, and the above compile error disappears. ================================================== # diff -u bsnmptools.c.orig bsnmptools.c --- bsnmptools.c.orig 2011-12-30 11:38:33.000000000 +0900 +++ bsnmptools.c 2011-12-30 11:42:16.000000000 +0900 @@ -256,6 +256,7 @@ u_int i; char *ptr; + *valp = NULL; *optp = NULL; /* skip leading junk */ ================================================== Thank you! Best Regards, -- moto kawasaki