ports/163084: net-mgmt/bsnmptools fails to build

moto kawasaki moto at kawasaki3.org
Fri Dec 30 03:00:39 UTC 2011


The following reply was made to PR ports/163084; it has been noted by GNATS.

From: moto kawasaki <moto at kawasaki3.org>
To: bug-followup at 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 <moto at kawasaki3.org>



More information about the freebsd-ports-bugs mailing list