tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mbuf initialization macros



Hi,

Thank you for your detailed comment!

On 2016/04/19 16:53, Robert Elz wrote:
>     Date:        Tue, 19 Apr 2016 13:49:09 +0900
>     From:        Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>
>     Message-ID:  <5715B8C5.2050407%iij.ad.jp@localhost>
> 
>   | Sorry, I was confused. I remove the declarations.
> 
> There is no need to apologise for any of this - the prototype declarations
> are certainly not wrong, just unnecessary (probably ... upon further thought
> I am wondering if perhaps some compiler somewhere might complain about the
> existence of a static func definition (inline or not) which is included in
> a source file that does not use the func - and that might be what the __unused
> is for ... The gcc in current (5.3.0) and the one in NetBSD 7 (4.8.4) do
> not need it, but perhaps some earlier version?   (Or clang?)
> 
> Maybe hold off on deleting the prototypes for another day - just in case...
> (either that, or be prepared to put them in later if someone complains
> about a build failure.)
> 
>   | Although, I think m_length() declaration may be removed (by separated
>   | commit) on this occasion, since the declaration is not needed as long as
>   | I read mbuf.h commit log.
> 
> I do not generally recommend the use of commit logs as a way to discover
> the truth about the universe -- they sometimes give some info as to what was
> in a developer's mind when they made some change - but here I do not see
> that.
> 
> Nevertheless, I believe that that prototype is also not needed (again,
> probably).   It might (and I stress, I am guessing) have been added
> initially because mbuf.h contained references to m_length that preceded its
> definition - however, they were all in macros, which means only really in
> the source files that call the macros (macro definitions can contain any
> random junk - it only matters where they are called) so the prototype was
> never really needed for that (and in any case, no such macro remains now) -
> or it may just be that the prototype was just converted from when m_length()
> was a real (external) function and so needed the prototype, when it could
> have just been deleted.
> 
> This one has been there over a decade now, and doing no apparent harm, so
> leaving it another few days cannot hurt!

I see. I leave the declaration, and I leave it to someone(tm) who knows
the circumstances well.


Thanks,

-- 
//////////////////////////////////////////////////////////////////////
Internet Initiative Japan Inc.

Device Engineering Section,
IoT Platform Development Department,
Network Division,
Technology Unit

Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>


Home | Main Index | Thread Index | Old Index