Page MenuHomeFreeBSD

sbuf(9): fix sbuf_drain_func typedef markup
ClosedPublic

Authored by yuripv on Mon, Sep 9, 8:16 AM.

Details

Summary

According to https://mandoc.bsd.lv/mdoc/style/function_pointers.html.

before:

SYNOPSIS
     #include <sys/types.h>
     #include <sys/sbuf.h>

     typedef int (
     sbuf_drain_func) (
     void *arg, const char *data, int len);
...

after:

SYNOPSIS
     #include <sys/types.h>
     #include <sys/sbuf.h>

     typedef int
     (*sbuf_drain_func)(void *arg, const char *data, int len);
...

Diff Detail

Repository
rS FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

yuripv created this revision.Mon, Sep 9, 8:16 AM
yuripv edited the summary of this revision. (Show Details)Mon, Sep 9, 8:19 AM
0mp accepted this revision.Mon, Sep 9, 9:02 AM
0mp added a subscriber: 0mp.

Seems fine to me.

This revision is now accepted and ready to land.Mon, Sep 9, 9:02 AM
yuripv added a comment.Mon, Sep 9, 9:35 AM
In D21569#469935, @0mp wrote:

Seems fine to me.

Thanks for taking a look, but looking more at it, I don't think it's entirely correct. Original version had (sbuf_drain_func), and using that gives a mandoc: share/man/man9/sbuf.9:69:5: WARNING: parenthesis in function name: (sbuf_drain_func) -- I'm going to ask mandoc developers if that warning really should be there. Until then, let's put this on hold. Sorry for the noise.

0mp added a comment.Mon, Sep 9, 9:42 AM
In D21569#469935, @0mp wrote:

Seems fine to me.

Thanks for taking a look, but looking more at it, I don't think it's entirely correct. Original version had (sbuf_drain_func), and using that gives a mandoc: share/man/man9/sbuf.9:69:5: WARNING: parenthesis in function name: (sbuf_drain_func) -- I'm going to ask mandoc developers if that warning really should be there. Until then, let's put this on hold. Sorry for the noise.

Also, you may take a look at the output of apropos -s 9 -a '.': there are much more "bugs" like this one.

yuripv updated this revision to Diff 61943.Wed, Sep 11, 7:23 PM
yuripv retitled this revision from sbuf(9): fix callback markup to sbuf(9): fix sbuf_drain_func typedef markup.

Correct the .Fo field (remove *). Ingo did agree that .Fo (f) shouldn't trigger the warning and it will be supressed in the future. For the moment, we'll just have a non-fatal warning.

This revision now requires review to proceed.Wed, Sep 11, 7:23 PM
This revision was not accepted when it landed; it landed in state Needs Review.Mon, Sep 16, 1:10 PM
This revision was automatically updated to reflect the committed changes.