Date: Sun, 4 Apr 2021 08:45:00 +0300 From: Daniel Braniss <danny@cs.huji.ac.il> To: Warner Losh <imp@bsdimp.com> Cc: FreeBSD-STABLE Mailing List <freebsd-stable@freebsd.org> Subject: Re: current make world brakes if HESIOD enabled Message-ID: <2596EB2A-8C43-42E5-947A-80EAAFE56EF7@cs.huji.ac.il> In-Reply-To: <CANCZdfrm1xAzsmu4%2BbaO-nCzvTiHim380FVo4PjxqOcnwPUy2Q@mail.gmail.com> References: <B6F89613-2CC5-4921-B425-0DC19F03D572@cs.huji.ac.il> <CANCZdfrm1xAzsmu4%2BbaO-nCzvTiHim380FVo4PjxqOcnwPUy2Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On 3 Apr 2021, at 20:22, Warner Losh <imp@bsdimp.com> wrote: >=20 > What's the error if you don't have these extra uintptr_t casts? --- getgrent.o --- = = = =20 *** [getgrent.o] Error code 1 = = = =20 make[4]: stopped in /h/rnd/git/stable/13/lib/libc = = =20= --- getpwent.o --- = = = =20 /h/rnd/git/stable/13/lib/libc/gen/getpwent.c:1111:8: error: cast to = smaller integer type 'enum nss_lookup_type' from 'void *' = [-Werror,-Wvoid-pointer-to-enum-cast] = =20 how =3D (enum nss_lookup_type)mdata; = = =20 ^~~~~~~~~~~~~~~~~~~~~~~~~~~ = = =20 1 error generated. =20 >=20 > Warner >=20 > On Sat, Apr 3, 2021 at 12:18 AM Daniel Braniss <danny@cs.huji.ac.il = <mailto:danny@cs.huji.ac.il>> wrote: > I must be the last person on earth to use Hesiod :-) > this are the diffs: >=20 > diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c > index afb89cab3..5832cb8c6 100644 > --- a/lib/libc/gen/getgrent.c > +++ b/lib/libc/gen/getgrent.c > @@ -971,7 +971,7 @@ dns_group(void *retval, void *mdata, va_list ap) > hes =3D NULL; > name =3D NULL; > gid =3D (gid_t)-1; > - how =3D (enum nss_lookup_type)mdata; > + how =3D (enum nss_lookup_type)(uintptr_t)mdata; > switch (how) { > case nss_lt_name: > name =3D va_arg(ap, const char *); > diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c > index a07ee109e..bc1d341fd 100644 > --- a/lib/libc/gen/getpwent.c > +++ b/lib/libc/gen/getpwent.c > @@ -1108,7 +1108,7 @@ dns_passwd(void *retval, void *mdata, va_list = ap) > hes =3D NULL; > name =3D NULL; > uid =3D (uid_t)-1; > - how =3D (enum nss_lookup_type)mdata; > + how =3D (enum nss_lookup_type)(uintptr_t)mdata; > switch (how) { > case nss_lt_name: > name =3D va_arg(ap, const char *); >=20 >=20 > _______________________________________________ > freebsd-stable@freebsd.org <mailto:freebsd-stable@freebsd.org> mailing = list > https://lists.freebsd.org/mailman/listinfo/freebsd-stable = <https://lists.freebsd.org/mailman/listinfo/freebsd-stable> > To unsubscribe, send any mail to = "freebsd-stable-unsubscribe@freebsd.org = <mailto:freebsd-stable-unsubscribe@freebsd.org>"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2596EB2A-8C43-42E5-947A-80EAAFE56EF7>