From nobody@FreeBSD.org  Sun Jan 29 04:58:29 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 18F6016A420
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 29 Jan 2006 04:58:29 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id D24B143D48
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 29 Jan 2006 04:58:28 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k0T4wSsk002077
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 29 Jan 2006 04:58:28 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k0T4wSbp002076;
	Sun, 29 Jan 2006 04:58:28 GMT
	(envelope-from nobody)
Message-Id: <200601290458.k0T4wSbp002076@www.freebsd.org>
Date: Sun, 29 Jan 2006 04:58:28 GMT
From: Aluminium Oxide <orac000@internet-mail.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: /usr/src/lib/libc/net/res_debug.c : make buildworld fails on i386 RELENG_6_0_0_RELEASE
X-Send-Pr-Version: www-2.3

>Number:         92488
>Category:       i386
>Synopsis:       /usr/src/lib/libc/net/res_debug.c : make buildworld fails on i386 RELENG_6_0_0_RELEASE
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-i386
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 29 05:00:12 GMT 2006
>Closed-Date:    Sun Jan 29 09:46:46 GMT 2006
>Last-Modified:  Sun Jan 29 09:46:46 GMT 2006
>Originator:     Aluminium Oxide
>Release:        RELENG_6_0_0_RELEASE
>Organization:
Reality Engineering
>Environment:
FreeBSD h2o.UNIVERSE.ore 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Thu Nov  3 09:36:13 UTC 2005     root@x64.samsco.home:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
A recently (3 days ago) cvsupped i386 RELENG_6_0_0_RELEASE make buildworld stops              with the following error:
________________________________________________________________________________
cc -O2 -fno-strict-aliasing -pipe -O3 -march=pentium3 -msse -mmmx -pipe -fforce-mem -fforce-addr -funroll-loops -fcse-follow-jumps -march=pentium3 -I/usr/src/lib/libc/include -I/usr/src/lib/libc/../../include -I/usr/src/lib/libc/i386 -D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../contrib/gdtoa -DINET6 -I/usr/obj/usr/src/lib/libc -DPOSIX_MISTAKE -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DYP -DHESIOD -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -c /usr/src/lib/libc/net/res_debug.c
In file included from /usr/src/lib/libc/net/res_debug.c:786:
/usr/src/lib/libc/net/res_debug.c: In function `__loc_aton':
/usr/src/lib/libc/net/res_debug.c:576: warning: passing arg 1 of `precsize_aton' from incompatible pointer type
In file included from /usr/src/lib/libc/net/res_debug.c:797:
/usr/src/lib/libc/net/res_debug.c:576: warning: passing arg 1 of `precsize_aton' from incompatible pointer type
In file included from /usr/src/lib/libc/net/res_debug.c:808:
/usr/src/lib/libc/net/res_debug.c:576: warning: passing arg 1 of `precsize_aton' from incompatible pointer type
*** Error code 1

Stop in /usr/src/lib/libc.

________________________________________________________________________________
Notes:

CFLAGS+=-O3 -march=pentium3 -msse -mmmx -pipe -fforce-mem -fforce-addr -funroll-loops -fcse-follow-jumps.

I sent this PR earlier but didn't know the much-prefferred diff -u format.
 
A diff for res_debug.c is included below.
>How-To-Repeat:
make buildworld on FreeBSD 6.0 RELEASE, on a Pentium III, recently cvsupped (RELENG_6_0_0_RELEASE)


>Fix:
I have made some small changes. My C's not the best so please check it over.

#diff -u /usr/src/lib/libc/net/res_debug.c.org /usr/src/lib/libc/net/res_debug.c
________________________________________________________________________________
--- res_debug.c.org	Sun Jan 29 14:59:22 2006
+++ res_debug.c	Sun Jan 29 14:59:38 2006
@@ -571,8 +571,8 @@
 
 /* converts ascii size/precision X * 10**Y(cm) to 0xXY.  moves pointer. */
 static u_int8_t
-precsize_aton(strptr)
-	char **strptr;
+precsize_aton(char **strptr)
+/*	char **strptr; */
 {
 	unsigned int mval = 0, cmval = 0;
 	u_int8_t retval = 0;
@@ -613,15 +613,15 @@
 
 /* converts ascii lat/lon to unsigned encoded 32-bit number.  moves pointer. */
 static u_int32_t
-latlon2ul(latlonstrptr,which)
-	char **latlonstrptr;
-	int *which;
+latlon2ul(char *latlonstrptr,int *which)
+/*	char **latlonstrptr; */
+/*	int *which; */
 {
 	char *cp;
 	u_int32_t retval;
 	int deg = 0, min = 0, secs = 0, secsfrac = 0;
 
-	cp = *latlonstrptr;
+	cp = latlonstrptr;
 
 	while (isdigit((unsigned char)*cp))
 		deg = deg * 10 + (*cp++ - '0');
@@ -704,7 +704,7 @@
 	while (isspace((unsigned char)*cp))    /* move to next field */
 		cp++;
 
-	*latlonstrptr = cp;
+	latlonstrptr = cp;
 
 	return (retval);
 }
@@ -716,7 +716,8 @@
 	const char *ascii;
 	u_char *binary;
 {
-	const char *cp, *maxcp;
+	char *cp;
+	char *maxcp;
 	u_char *bcp;
 
 	u_int32_t latit = 0, longit = 0, alt = 0;
@@ -725,21 +726,22 @@
 	u_int8_t hp = 0x16;	/* default = 1e6 cm = 10000.00m = 10km */
 	u_int8_t vp = 0x13;	/* default = 1e3 cm = 10.00m */
 	u_int8_t siz = 0x12;	/* default = 1e2 cm = 1.00m */
-	int which1 = 0, which2 = 0;
+	int *which1 = 0, *which2 = 0;
 
-	cp = ascii;
-	maxcp = cp + strlen(ascii);
+	*cp = *ascii;
+	*maxcp = *cp + strlen(ascii);
 
-	lltemp1 = latlon2ul(&cp, &which1);
+	lltemp1 = latlon2ul(cp, which1);
 
-	lltemp2 = latlon2ul(&cp, &which2);
+	lltemp2 = latlon2ul(cp, which2);
 
-	switch (which1 + which2) {
+	switch (*which1 + *which2) {
 	case 3:			/* 1 + 2, the only valid combination */
-		if ((which1 == 1) && (which2 == 2)) { /* normal case */
+		if ((*which1 == 1) && (*which2 == 2)) { /* normal case */
 			latit = lltemp1;
 			longit = lltemp2;
-		} else if ((which1 == 2) && (which2 == 1)) { /* reversed */
+		} else if ((*which1 == 2) && (*which2 == 1)) { /* reversed 
+*/
 			longit = lltemp1;
 			latit = lltemp2;
 		} else {	/* some kind of brokenness */

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: arved 
State-Changed-When: Sun Jan 29 09:46:25 UTC 2006 
State-Changed-Why:  
You are using unsupported CFLAGS 

http://www.freebsd.org/cgi/query-pr.cgi?pr=92488 
>Unformatted:
