This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [hurd,commited] hurd sendmsg: Fix warning on calling CMSG_*HDR


On Dez 29 2019, Samuel Thibault wrote:

> Andreas Schwab, le dim. 29 déc. 2019 18:12:02 +0100, a ecrit:
>> > -  for (; cmsg; cmsg = CMSG_NXTHDR (message, cmsg))
>> > +  for (; cmsg; cmsg = CMSG_NXTHDR ((struct msghdr *) message, cmsg))
>> 
>> Why is the first argument of __cmsg_nxthdr not const?
>
> I don't know, it is so on other systems as well.
>
> I guess an issue is that if it was const, CMSG_NXTHDR would only
> be allowed to return a const,

The return value is not based on the first argument.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]