svn commit: r317290 - head/tools/regression/geom_gpt

Ngie Cooper (yaneurabeya) yaneurabeya at gmail.com
Sat Apr 22 21:19:51 UTC 2017


> On Apr 22, 2017, at 14:09, Rodney W. Grimes <freebsd at pdx.rh.CN85.dnsmgr.net> wrote:

…

> I had seen that already when I made my post, that docuement is not going
> to stop someone from going "Oh, these are out of order I am going to sort
> them since I am here"  They well then probably have issues due to your next
> statement about WARNS and go hum, what is that all about.  And either
> investigate and hopefully find the right thing, or do more wrong things.
> 
> When #includes are out of order for good reason the source code file should
> be market as such and not dependend on the near 0 likelyhood someone
> is going to go read a man page to find out why.


The issue you’re noting is no different from someone removing/shuffling around another header in the C file. If someone does that, the least they need to do is build test their changes, and ideally they should runtime test the changes as well.

WARNS is insurance against someone sorting headers and things breaking again, because gctl_dump will not be defined (per the compiler message noted in the PR). At which point the party should do “man gctl_dump” and see the comment about stdio.h being required for it:

$ man gctl_dump
...
SYNOPSIS
     /* stdio.h is only required for `gctl_dump` */
     #include <stdio.h>
     #include <libgeom.h>
…

Put differently, this is no different of an issue than anything else and I really don’t see the value in adding a comment stating that the order is such because of gctl_dump needing stdio.h to be #include’d first.

Thanks,
-Ngie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20170422/07545066/attachment.sig>


More information about the svn-src-all mailing list