Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Oct 2009 16:46:01 +0100 (CET)
From:      Ulrich Spörlein <uqs@spoerlein.net>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        Marcel Moolenaar <marcel@FreeBSD.org>
Subject:   bin/139970: sbin/geom/class/part: WARNS6 cleanup
Message-ID:  <200910251546.n9PFk11Q082516@roadrunner.spoerlein.net>
Resent-Message-ID: <200910251600.n9PG0LYu020270@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         139970
>Category:       bin
>Synopsis:       sbin/geom/class/part: WARNS6 cleanup
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 25 16:00:21 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Ulrich Spörlein
>Release:        FreeBSD 9.0-CURRENT i386
>Organization:
>Environment:
	
>Description:
The warning produced by GCC is bogus, but it does not grok the twisted logic.
Plaster over it with an explicit initialization and bump WARNS accordingly
>How-To-Repeat:
	
>Fix:
	

diff -r d1a04723c41c -r dabb79c85f13 sbin/geom/class/part/Makefile
--- a/sbin/geom/class/part/Makefile	Fri Oct 23 15:14:54 2009 +0000
+++ b/sbin/geom/class/part/Makefile	Fri Oct 23 10:34:06 2009 +0200
@@ -6,6 +6,4 @@
 
 LDADD=	-lutil
 
-WARNS?=	4
-
 .include <bsd.lib.mk>
diff -r d1a04723c41c -r dabb79c85f13 sbin/geom/class/part/geom_part.c
--- a/sbin/geom/class/part/geom_part.c	Fri Oct 23 15:14:54 2009 +0000
+++ b/sbin/geom/class/part/geom_part.c	Fri Oct 23 10:34:06 2009 +0200
@@ -192,6 +192,7 @@
 	unsigned long long sector, bestsector;
 
 	bestpp = NULL;
+	bestsector = 0;
 	LIST_FOREACH(pp, &gp->lg_provider, lg_provider) {
 		s = find_provcfg(pp, "start");
 		if (s == NULL) {
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910251546.n9PFk11Q082516>