Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Feb 2023 14:47:52 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        Mateusz Guzik <mjguzik@gmail.com>
Cc:        Jessica Clarke <jrtc27@freebsd.org>,  "src-committers@freebsd.org" <src-committers@freebsd.org>,  "dev-commits-src-all@freebsd.org" <dev-commits-src-all@freebsd.org>,  "dev-commits-src-main@freebsd.org" <dev-commits-src-main@freebsd.org>
Subject:   Re: git: eca005d8531f - main - zlib: silence K&R warns
Message-ID:  <CANCZdfrpn0OO8J_ci79Ogo2Y0jN05=eeCax6PCBnAuAQJvDdsw@mail.gmail.com>
In-Reply-To: <CAGudoHHPh04DXTp-PZC8v_dpj%2BpkMf7gzk=9jUXKOzbvQ_Wa3Q@mail.gmail.com>
References:  <202302122113.31CLD2av012258@gitrepo.freebsd.org> <72B4A01A-521D-4739-B1DD-6A19E98771EE@freebsd.org> <CAGudoHH-m%2BA1J9yr2gi3D=9ef3Nt2iQh60VCUf9%2BFDQfk%2Bf8sg@mail.gmail.com> <05AA573A-9692-40C3-8BF6-D52864BAB337@freebsd.org> <CAGudoHHPh04DXTp-PZC8v_dpj%2BpkMf7gzk=9jUXKOzbvQ_Wa3Q@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Sun, Feb 12, 2023 at 2:40 PM Mateusz Guzik <mjguzik@gmail.com> wrote:

> On 2/12/23, Jessica Clarke <jrtc27@freebsd.org> wrote:
> > On 12 Feb 2023, at 21:23, Mateusz Guzik <mjguzik@gmail.com> wrote:
> >>
> >> On 2/12/23, Jessica Clarke <jrtc27@freebsd.org> wrote:
> >>> On 12 Feb 2023, at 21:13, Mateusz Guzik <mjg@FreeBSD.org> wrote:
> >>>>
> >>>> The branch main has been updated by mjg:
> >>>>
> >>>> URL:
> >>>>
> https://cgit.FreeBSD.org/src/commit/?id=eca005d8531fd153f46f941f3101e73cdf181a0b
> >>>>
> >>>> commit eca005d8531fd153f46f941f3101e73cdf181a0b
> >>>> Author:     Mateusz Guzik <mjg@FreeBSD.org>
> >>>> AuthorDate: 2023-02-12 21:12:34 +0000
> >>>> Commit:     Mateusz Guzik <mjg@FreeBSD.org>
> >>>> CommitDate: 2023-02-12 21:12:34 +0000
> >>>>
> >>>>   zlib: silence K&R warns
> >>>>
> >>>>   Sponsored by:   Rubicon Communications, LLC ("Netgate")
> >>>> ---
> >>>> sys/conf/files            | 18 +++++++++++-------
> >>>> sys/modules/zlib/Makefile |  2 ++
> >>>> 2 files changed, 13 insertions(+), 7 deletions(-)
> >>>>
> >>>> diff --git a/sys/conf/files b/sys/conf/files
> >>>> index 9171b434a7bf..53f90f7afc22 100644
> >>>> --- a/sys/conf/files
> >>>> +++ b/sys/conf/files
> >>>> @@ -4099,28 +4099,32 @@ libkern/strtouq.c          standard
> >>>> libkern/strvalid.c         standard
> >>>> libkern/timingsafe_bcmp.c  standard
> >>>> contrib/zlib/adler32.c             optional crypto | geom_uzip | \
> >>>> -  mxge | ddb_ctf | gzio | zfs | zlib
> >>>> +  mxge | ddb_ctf | gzio | zfs | zlib \
> >>>> +  compile-with "${NORMAL_C} -Wno-deprecated-non-prototype"
> >>>
> >>> This doesn’t exist pre-Clang 15.
> >>>
> >>
> >> this is main-only and it already has llvm15. the build requirement is
> >> top of the branch, so I don't see a problem.
> >>
> >> if you ran into trouble cross-compiling, you should probably update
> >> that env instead of expecting working around the warn in the tree for
> >> older compilers
> >
> > That is not our policy. Please fix this.
> >
>
> Are you sure about that? I distinctly recall the supported path to get
> top of the latest stable branch first, from there you should be able
> to build the toolchain and the kernel.
>
> afaics the above change did not affect it
>
> If you insist, I can look for the exact paragraph in the docs.
>

The fix is trivial.

https://reviews.freebsd.org/D38550

Please focus your efforts on commenting on the above and testing it out.

Warner


> > Jess
> >
> >>> Jess
> >>>
> >>>> contrib/zlib/compress.c            optional crypto | geom_uzip | \
> >>>>    mxge | ddb_ctf | gzio | zfs | zlib \
> >>>> -  compile-with "${NORMAL_C} -Wno-cast-qual"
> >>>> +  compile-with "${NORMAL_C} -Wno-cast-qual
> >>>> -Wno-deprecated-non-prototype"
> >>>> contrib/zlib/crc32.c               optional crypto | geom_uzip | \
> >>>>    mxge | ddb_ctf | gzio | zfs | zlib \
> >>>>    compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}"
> >>>> contrib/zlib/deflate.c             optional crypto | geom_uzip | \
> >>>>    mxge | ddb_ctf | gzio | zfs | zlib \
> >>>> -  compile-with "${NORMAL_C} -Wno-cast-qual"
> >>>> +  compile-with "${NORMAL_C} -Wno-cast-qual
> >>>> -Wno-deprecated-non-prototype"
> >>>> contrib/zlib/inffast.c             optional crypto | geom_uzip | \
> >>>> -  mxge | ddb_ctf | gzio | zfs | zlib
> >>>> +  mxge | ddb_ctf | gzio | zfs | zlib \
> >>>> +  compile-with "${NORMAL_C} -Wno-deprecated-non-prototype"
> >>>> contrib/zlib/inflate.c             optional crypto | geom_uzip | \
> >>>> -  mxge | ddb_ctf | gzio | zfs | zlib
> >>>> +  mxge | ddb_ctf | gzio | zfs | zlib \
> >>>> +  compile-with "${NORMAL_C} -Wno-deprecated-non-prototype"
> >>>> contrib/zlib/inftrees.c            optional crypto | geom_uzip | \
> >>>> -  mxge | ddb_ctf | gzio | zfs | zlib
> >>>> +  mxge | ddb_ctf | gzio | zfs | zlib \
> >>>> +  compile-with "${NORMAL_C} -Wno-deprecated-non-prototype"
> >>>> contrib/zlib/trees.c               optional crypto | geom_uzip | \
> >>>>    mxge | ddb_ctf | gzio | zfs | zlib \
> >>>>    compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}"
> >>>> contrib/zlib/uncompr.c             optional crypto | geom_uzip | \
> >>>>    mxge | ddb_ctf | gzio | zfs | zlib \
> >>>> -  compile-with "${NORMAL_C} -Wno-cast-qual"
> >>>> +  compile-with "${NORMAL_C} -Wno-cast-qual
> >>>> -Wno-deprecated-non-prototype"
> >>>> contrib/zlib/zutil.c               optional crypto | geom_uzip | \
> >>>>    mxge | ddb_ctf | gzio | zfs | zlib \
> >>>>    compile-with "${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}"
> >>>> diff --git a/sys/modules/zlib/Makefile b/sys/modules/zlib/Makefile
> >>>> index 6391255e512b..178d3a3f7ab7 100644
> >>>> --- a/sys/modules/zlib/Makefile
> >>>> +++ b/sys/modules/zlib/Makefile
> >>>> @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=${NO_WSTRICT_PROTOTYPES} #
> >>>> crc32.c:586
> >>>> CWARNFLAGS.trees.c+=${NO_WSTRICT_PROTOTYPES} # trees.c:232
> >>>> CWARNFLAGS.zutil.c+=${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32
> >>>>
> >>>> +CWARNFLAGS+=-Wno-deprecated-non-prototype
> >>>> +
> >>>> .include <bsd.kmod.mk>
> >>>
> >>>
> >>
> >>
> >> --
> >> Mateusz Guzik <mjguzik gmail.com>
> >
> >
>
>
> --
> Mateusz Guzik <mjguzik gmail.com>
>

[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Feb 12, 2023 at 2:40 PM Mateusz Guzik &lt;<a href="mailto:mjguzik@gmail.com">mjguzik@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2/12/23, Jessica Clarke &lt;<a href="mailto:jrtc27@freebsd.org" target="_blank">jrtc27@freebsd.org</a>&gt; wrote:<br>
&gt; On 12 Feb 2023, at 21:23, Mateusz Guzik &lt;<a href="mailto:mjguzik@gmail.com" target="_blank">mjguzik@gmail.com</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On 2/12/23, Jessica Clarke &lt;<a href="mailto:jrtc27@freebsd.org" target="_blank">jrtc27@freebsd.org</a>&gt; wrote:<br>
&gt;&gt;&gt; On 12 Feb 2023, at 21:13, Mateusz Guzik &lt;mjg@FreeBSD.org&gt; wrote:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; The branch main has been updated by mjg:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; URL:<br>
&gt;&gt;&gt;&gt; <a href="https://cgit.FreeBSD.org/src/commit/?id=eca005d8531fd153f46f941f3101e73cdf181a0b" rel="noreferrer" target="_blank">https://cgit.FreeBSD.org/src/commit/?id=eca005d8531fd153f46f941f3101e73cdf181a0b</a><br>;
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; commit eca005d8531fd153f46f941f3101e73cdf181a0b<br>
&gt;&gt;&gt;&gt; Author:     Mateusz Guzik &lt;mjg@FreeBSD.org&gt;<br>
&gt;&gt;&gt;&gt; AuthorDate: 2023-02-12 21:12:34 +0000<br>
&gt;&gt;&gt;&gt; Commit:     Mateusz Guzik &lt;mjg@FreeBSD.org&gt;<br>
&gt;&gt;&gt;&gt; CommitDate: 2023-02-12 21:12:34 +0000<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;   zlib: silence K&amp;R warns<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;   Sponsored by:   Rubicon Communications, LLC (&quot;Netgate&quot;)<br>
&gt;&gt;&gt;&gt; ---<br>
&gt;&gt;&gt;&gt; sys/conf/files            | 18 +++++++++++-------<br>
&gt;&gt;&gt;&gt; sys/modules/zlib/Makefile |  2 ++<br>
&gt;&gt;&gt;&gt; 2 files changed, 13 insertions(+), 7 deletions(-)<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; diff --git a/sys/conf/files b/sys/conf/files<br>
&gt;&gt;&gt;&gt; index 9171b434a7bf..53f90f7afc22 100644<br>
&gt;&gt;&gt;&gt; --- a/sys/conf/files<br>
&gt;&gt;&gt;&gt; +++ b/sys/conf/files<br>
&gt;&gt;&gt;&gt; @@ -4099,28 +4099,32 @@ libkern/strtouq.c          standard<br>
&gt;&gt;&gt;&gt; libkern/strvalid.c         standard<br>
&gt;&gt;&gt;&gt; libkern/timingsafe_bcmp.c  standard<br>
&gt;&gt;&gt;&gt; contrib/zlib/adler32.c             optional crypto | geom_uzip | \<br>
&gt;&gt;&gt;&gt; -  mxge | ddb_ctf | gzio | zfs | zlib<br>
&gt;&gt;&gt;&gt; +  mxge | ddb_ctf | gzio | zfs | zlib \<br>
&gt;&gt;&gt;&gt; +  compile-with &quot;${NORMAL_C} -Wno-deprecated-non-prototype&quot;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; This doesn’t exist pre-Clang 15.<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; this is main-only and it already has llvm15. the build requirement is<br>
&gt;&gt; top of the branch, so I don&#39;t see a problem.<br>
&gt;&gt;<br>
&gt;&gt; if you ran into trouble cross-compiling, you should probably update<br>
&gt;&gt; that env instead of expecting working around the warn in the tree for<br>
&gt;&gt; older compilers<br>
&gt;<br>
&gt; That is not our policy. Please fix this.<br>
&gt;<br>
<br>
Are you sure about that? I distinctly recall the supported path to get<br>
top of the latest stable branch first, from there you should be able<br>
to build the toolchain and the kernel.<br>
<br>
afaics the above change did not affect it<br>
<br>
If you insist, I can look for the exact paragraph in the docs.<br></blockquote><div><br></div><div>The fix is trivial.</div><div><br></div><div><a href="https://reviews.freebsd.org/D38550">https://reviews.freebsd.org/D38550</a><br></div><div><br></div><div>Please focus your efforts on commenting on the above and testing it out.</div><div><br></div><div>Warner</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
&gt; Jess<br>
&gt;<br>
&gt;&gt;&gt; Jess<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; contrib/zlib/compress.c            optional crypto | geom_uzip | \<br>
&gt;&gt;&gt;&gt;    mxge | ddb_ctf | gzio | zfs | zlib \<br>
&gt;&gt;&gt;&gt; -  compile-with &quot;${NORMAL_C} -Wno-cast-qual&quot;<br>
&gt;&gt;&gt;&gt; +  compile-with &quot;${NORMAL_C} -Wno-cast-qual<br>
&gt;&gt;&gt;&gt; -Wno-deprecated-non-prototype&quot;<br>
&gt;&gt;&gt;&gt; contrib/zlib/crc32.c               optional crypto | geom_uzip | \<br>
&gt;&gt;&gt;&gt;    mxge | ddb_ctf | gzio | zfs | zlib \<br>
&gt;&gt;&gt;&gt;    compile-with &quot;${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}&quot;<br>
&gt;&gt;&gt;&gt; contrib/zlib/deflate.c             optional crypto | geom_uzip | \<br>
&gt;&gt;&gt;&gt;    mxge | ddb_ctf | gzio | zfs | zlib \<br>
&gt;&gt;&gt;&gt; -  compile-with &quot;${NORMAL_C} -Wno-cast-qual&quot;<br>
&gt;&gt;&gt;&gt; +  compile-with &quot;${NORMAL_C} -Wno-cast-qual<br>
&gt;&gt;&gt;&gt; -Wno-deprecated-non-prototype&quot;<br>
&gt;&gt;&gt;&gt; contrib/zlib/inffast.c             optional crypto | geom_uzip | \<br>
&gt;&gt;&gt;&gt; -  mxge | ddb_ctf | gzio | zfs | zlib<br>
&gt;&gt;&gt;&gt; +  mxge | ddb_ctf | gzio | zfs | zlib \<br>
&gt;&gt;&gt;&gt; +  compile-with &quot;${NORMAL_C} -Wno-deprecated-non-prototype&quot;<br>
&gt;&gt;&gt;&gt; contrib/zlib/inflate.c             optional crypto | geom_uzip | \<br>
&gt;&gt;&gt;&gt; -  mxge | ddb_ctf | gzio | zfs | zlib<br>
&gt;&gt;&gt;&gt; +  mxge | ddb_ctf | gzio | zfs | zlib \<br>
&gt;&gt;&gt;&gt; +  compile-with &quot;${NORMAL_C} -Wno-deprecated-non-prototype&quot;<br>
&gt;&gt;&gt;&gt; contrib/zlib/inftrees.c            optional crypto | geom_uzip | \<br>
&gt;&gt;&gt;&gt; -  mxge | ddb_ctf | gzio | zfs | zlib<br>
&gt;&gt;&gt;&gt; +  mxge | ddb_ctf | gzio | zfs | zlib \<br>
&gt;&gt;&gt;&gt; +  compile-with &quot;${NORMAL_C} -Wno-deprecated-non-prototype&quot;<br>
&gt;&gt;&gt;&gt; contrib/zlib/trees.c               optional crypto | geom_uzip | \<br>
&gt;&gt;&gt;&gt;    mxge | ddb_ctf | gzio | zfs | zlib \<br>
&gt;&gt;&gt;&gt;    compile-with &quot;${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}&quot;<br>
&gt;&gt;&gt;&gt; contrib/zlib/uncompr.c             optional crypto | geom_uzip | \<br>
&gt;&gt;&gt;&gt;    mxge | ddb_ctf | gzio | zfs | zlib \<br>
&gt;&gt;&gt;&gt; -  compile-with &quot;${NORMAL_C} -Wno-cast-qual&quot;<br>
&gt;&gt;&gt;&gt; +  compile-with &quot;${NORMAL_C} -Wno-cast-qual<br>
&gt;&gt;&gt;&gt; -Wno-deprecated-non-prototype&quot;<br>
&gt;&gt;&gt;&gt; contrib/zlib/zutil.c               optional crypto | geom_uzip | \<br>
&gt;&gt;&gt;&gt;    mxge | ddb_ctf | gzio | zfs | zlib \<br>
&gt;&gt;&gt;&gt;    compile-with &quot;${NORMAL_C} ${NO_WSTRICT_PROTOTYPES}&quot;<br>
&gt;&gt;&gt;&gt; diff --git a/sys/modules/zlib/Makefile b/sys/modules/zlib/Makefile<br>
&gt;&gt;&gt;&gt; index 6391255e512b..178d3a3f7ab7 100644<br>
&gt;&gt;&gt;&gt; --- a/sys/modules/zlib/Makefile<br>
&gt;&gt;&gt;&gt; +++ b/sys/modules/zlib/Makefile<br>
&gt;&gt;&gt;&gt; @@ -25,4 +25,6 @@ CWARNFLAGS.crc32.c+=${NO_WSTRICT_PROTOTYPES} #<br>
&gt;&gt;&gt;&gt; crc32.c:586<br>
&gt;&gt;&gt;&gt; CWARNFLAGS.trees.c+=${NO_WSTRICT_PROTOTYPES} # trees.c:232<br>
&gt;&gt;&gt;&gt; CWARNFLAGS.zutil.c+=${NO_WSTRICT_PROTOTYPES} # zutil.c:27,32<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; +CWARNFLAGS+=-Wno-deprecated-non-prototype<br>
&gt;&gt;&gt;&gt; +<br>
&gt;&gt;&gt;&gt; .include &lt;<a href="http://bsd.kmod.mk" rel="noreferrer" target="_blank">bsd.kmod.mk</a>&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; Mateusz Guzik &lt;mjguzik <a href="http://gmail.com" rel="noreferrer" target="_blank">gmail.com</a>&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
-- <br>
Mateusz Guzik &lt;mjguzik <a href="http://gmail.com" rel="noreferrer" target="_blank">gmail.com</a>&gt;<br>
</blockquote></div></div>
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfrpn0OO8J_ci79Ogo2Y0jN05=eeCax6PCBnAuAQJvDdsw>