On 03/14/16 21:33, Gleb Smirnoff wrote:
On Mon, Mar 14, 2016 at 02:31:37PM -0400, Ryan Stone wrote:
R> On Mon, Mar 14, 2016 at 2:07 PM, Gleb Smirnoff <gleb...@freebsd.org> wrote:
R>
R> >   Remove useless cast in SYSCTL_ADD_COUNTER_U64 macro.
R> >
R>
R> Is it useless?  I believe that the point is to give a compiler error if an
R> incompatible pointer type was passed as the ptr parameter.

Thanks for explanation! I will back out.


Hi,

I added the casts to get more checks with regard to the type safety in the sysctls, because sysctl_add_oid() uses "void *". They are not useless.

Maybe this should be explained in a comment somewhere?

Similarly you'll find a set of sizeof() compile time assert checks for the static sysctls.

--HPS
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to