bin/139970: sbin/geom/class/part: WARNS6 cleanup

Ulrich Spörlein uqs at spoerlein.net
Sun Oct 25 16:00:22 UTC 2009


>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:


More information about the freebsd-bugs mailing list