Page MenuHomeFreeBSD

sbuf(9): fix sbuf_drain_func typedef markup
ClosedPublic

Authored by yuripv on Sep 9 2019, 8:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 20 2023, 6:50 AM
Unknown Object (File)
Nov 24 2023, 12:58 AM
Unknown Object (File)
Jun 10 2023, 4:31 PM
Unknown Object (File)
Apr 8 2023, 12:30 AM
Unknown Object (File)
Mar 21 2023, 8:27 PM
Unknown Object (File)
Jan 15 2023, 1:44 PM
Unknown Object (File)
Jan 1 2023, 5:22 AM
Unknown Object (File)
Dec 23 2022, 1:41 PM
Subscribers

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 - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

0mp added a subscriber: 0mp.

Seems fine to me.

This revision is now accepted and ready to land.Sep 9 2019, 9:02 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.

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 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.Sep 11 2019, 7:23 PM
This revision was not accepted when it landed; it landed in state Needs Review.Sep 16 2019, 1:10 PM
This revision was automatically updated to reflect the committed changes.