Re: svn commit: r358257 - in head/sys: kern sys

2020-02-22 Thread Ryan Libby
On Sat, Feb 22, 2020 at 7:53 PM Kyle Evans  wrote:
>
> On Sat, Feb 22, 2020 at 9:32 PM Ryan Libby  wrote:
> >
> > Author: rlibby
> > Date: Sun Feb 23 03:32:11 2020
> > New Revision: 358257
> > URL: https://svnweb.freebsd.org/changeset/base/358257
> >
> > Log:
> >   vfs: quiet -Wwrite-strings
> >
> >   Reviewed by:  kib, markj
> >   Differential Revision:https://reviews.freebsd.org/D23797
> >
>
> Only tangentially related to this, I have a patch in one of my WIP
> branches that const-poisons vn_fullpath()'s retbuf parameter, if
> that's of any interest. Many consumers will set a default value to a
> statically allocated string before passing it in as the retbuf -- I
> had a use-case where I'd be trying to do similar but with a function
> that actually returns a const char *, but that particular case may not
> get committed.
>
> I can post the patch to phabricator if anyone cares about this -- the
> impact on callers isn't actually all that bad, basically just
> shuffling around declarations. There's only one case where it ends up
> introducing some __DECONST ugliness because the caller writes it out
> with uiomove().
>
> Thanks,
>
> Kyle Evans

I did notice vn_fullpath when I tried out the build with
-Wwrite-strings, and I decided to stay far away from it!
Feel free to add me to a review if you decide to post it.

In general there was a lot more that was triggered by
-Wwrite-strings, and I only touched the stuff that was in
sys/kern or sys/vm and that I thought would have quick and
non-controversial resolutions.
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"


Re: svn commit: r358257 - in head/sys: kern sys

2020-02-22 Thread Kyle Evans
On Sat, Feb 22, 2020 at 9:32 PM Ryan Libby  wrote:
>
> Author: rlibby
> Date: Sun Feb 23 03:32:11 2020
> New Revision: 358257
> URL: https://svnweb.freebsd.org/changeset/base/358257
>
> Log:
>   vfs: quiet -Wwrite-strings
>
>   Reviewed by:  kib, markj
>   Differential Revision:https://reviews.freebsd.org/D23797
>

Only tangentially related to this, I have a patch in one of my WIP
branches that const-poisons vn_fullpath()'s retbuf parameter, if
that's of any interest. Many consumers will set a default value to a
statically allocated string before passing it in as the retbuf -- I
had a use-case where I'd be trying to do similar but with a function
that actually returns a const char *, but that particular case may not
get committed.

I can post the patch to phabricator if anyone cares about this -- the
impact on callers isn't actually all that bad, basically just
shuffling around declarations. There's only one case where it ends up
introducing some __DECONST ugliness because the caller writes it out
with uiomove().

Thanks,

Kyle Evans
___
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"