Subject: Re: macppc build error in pdisk
To: None <current-users@netbsd.org>
From: Antoine Reilles <Antoine.Reilles@loria.fr>
List: current-users
Date: 10/24/2006 19:35:14
--0eh6TmSyL6TZE2Uz
Content-Type: multipart/mixed; boundary="fdj2RfSjLxBAspz7"
Content-Disposition: inline


--fdj2RfSjLxBAspz7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

On Tue, Oct 24, 2006 at 07:30:32PM +0200, Erik Bertelsen wrote:
> in -current sources as of today (and for several days) on macppc:
>=20
> dependall =3D=3D=3D> sbin/pdisk
>    compile  pdisk/validate.o
> cc1: warnings being treated as errors
> /home/NetBSD/src/dist/pdisk/validate.c: In function 'validate_map':
> /home/NetBSD/src/dist/pdisk/validate.c:426: warning: comparison of
> unsigned expression < 0 is always false
> /home/NetBSD/src/dist/pdisk/validate.c:455: warning: comparison of
> unsigned expression < 0 is always false
>=20
> *** Failed target:  validate.o

I had the same error.
Simply making the "limit" variable be signed does solve build, though
the code still looks quite strange.

Best regards,
antoine

--fdj2RfSjLxBAspz7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch
Content-Transfer-Encoding: quoted-printable

Index: dist/pdisk/validate.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/src/dist/pdisk/validate.c,v
retrieving revision 1.2
diff -u -r1.2 validate.c
--- dist/pdisk/validate.c	13 Jul 2005 15:22:55 -0000	1.2
+++ dist/pdisk/validate.c	24 Oct 2006 17:32:23 -0000
@@ -355,7 +355,7 @@
     range_list *list;
     char *name;
     int i;
-    u32 limit;
+    long long limit;
     int printed;
    =20
     //printf("Validation not implemented yet.\n");
@@ -457,7 +457,7 @@
 	    printf("\tentry count is 0x%lx, real value unknown\n", mb->dpme_map_e=
ntries);
 	} else if (mb->dpme_map_entries !=3D limit) {
 	    printed =3D 1;
-	    printf("\tentry count is 0x%lx, should be %ld\n", mb->dpme_map_entrie=
s, limit);
+	    printf("\tentry count is 0x%lx, should be %lld\n", mb->dpme_map_entri=
es, limit);
 	}
 	// lblocks contained within physical
 	if (mb->dpme_lblock_start >=3D mb->dpme_pblocks

--fdj2RfSjLxBAspz7--

--0eh6TmSyL6TZE2Uz
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFFPk7S4VqmoGDE/mwRAlqcAJ41xP5cnCmS4aj5R0Aw4R8hBDur9QCfR8bK
UZcXY4pzS9CxTTaF3PdCzT0=
=fiZN
-----END PGP SIGNATURE-----

--0eh6TmSyL6TZE2Uz--