> Okay, I've gotten really, really sick of the fact that almost any > networking driver or STREAMS code has to disable the E_PTRDIFF_OVERFLOW > lint warning. > > The reason is that all the calls to those system macros trigger a lint > warning. If it weren't for the warnings, those macros turn out to be > really useful. I never worried about them, but now they are an official > part of the DDI, it seems like we ought not to be making lint complain > when folks use our macros/functions in the documented ways. > > I'm thinking of basically converting the macros so that they mp->b_rptr > and mp->b_wptr and such pointers are first cast to a uintptr_t, before > the math is performed on them. E.g: > > #define MBLKL(mp) ((uintptr_t)(mp)->b_wptr - (uintptr_t)(mp)->b_rptr) > > Anyone have any thoughts about this? If nobody objects, I'll file a bug > and probably submit an RTI next week. (I wouldn't mind having a > volunteer for codereview, either! :-)
It sounds fine to me. I thought I'd filed a bug on this, but the issue may have rattled out of my head before I got around to it. -- meem _______________________________________________ networking-discuss mailing list [email protected]
