i386/92488: /usr/src/lib/libc/net/res_debug.c : make buildworld fails on i386 RELENG_6_0_0_RELEASE

Aluminium Oxide orac000 at internet-mail.org
Sat Jan 28 21:00:13 PST 2006


>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:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jan 29 05:00:12 GMT 2006
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:


More information about the freebsd-i386 mailing list