This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author neologix
Recipients baikie, neologix
Date 2011-08-28.15:56:43
SpamBayes Score 2.8148436e-06
Marked as misclassified No
Message-id <CAH_1eM14HrGNdySCF58p3A1G=LYLo1Ooi2+Y1B8VUj+=mW49yA@mail.gmail.com>
In-reply-to <20110825210917.GA3939@dbwatson.ukfsn.org>
Content
> That has since been changed.  I'm reading from POSIX.1-2008,
> which says:

I see.

> The warning against using values larger than 2**32 - 1 is still
> there, I presume because they would not fit in a 32-bit signed
> int.

I assume you mean 2**31 - 1.

> I take it you mean CMSG_FIRSTHDR here

Indeed.

> IIRC, I saw an implementation in old FreeBSD headers that did not
> check msg_controllen, and hence did not return NULL as RFC 3542
> requires.

Alright, that's all I wanted to know.

> That said, the fact remains that the compiler warning is spurious
> if msg_controllen can be signed on some systems, and I still
> don't think decreasing the robustness of the code (particularly
> against any future modifications to that code) just for the sake
> of silencing a spurious warning is a good thing to do.  People
> can read the comment above the "offending" line and see that the
> compiler has got it wrong.

Well, the compiler does not get it wrong. If socklen_t is defined as
an unsigned int, it has no way of knowing that it might be defined as
signed int on other platforms.
History
Date User Action Args
2011-08-28 15:56:44neologixsetrecipients: + neologix, baikie
2011-08-28 15:56:43neologixlinkissue12837 messages
2011-08-28 15:56:43neologixcreate