|
|
Message-ID: <Pine.BSM.4.64L.2603172333570.17358@herc.mirbsd.org> Date: Tue, 17 Mar 2026 23:35:04 +0000 (UTC) From: Thorsten Glaser <tg@...bsd.de> To: musl@...ts.openwall.com Subject: Re: [PATCH] sys/socket.h: Fixed -Wsign-compare in musl CMSG_NXTHDR() macro Jérémy PRIMARD dixit: >__CMSG_LEN(cmsg) is an unsigned long >sizeof(struct cmsghdr) is an unsigned long No, it’s a size_t. >so __MHDR_END(mhdr) - (unsigned char *)(cmsg) will not result in an >unsigned long, but in a signed long. The compiler think that there No, a ptrdiff_t. >- __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= __MHDR_END(mhdr) - >(unsigned char *)(cmsg) \ >+ __CMSG_LEN(cmsg) + sizeof(struct cmsghdr) >= (unsigned >long)(__MHDR_END(mhdr) - (unsigned char *)(cmsg)) \ Also size_t in the patch ;) and please fix your mailer to not wrap inline patches. bye, //mirabilos -- (gnutls can also be used, but if you are compiling lynx for your own use, there is no reason to consider using that package) -- Thomas E. Dickey on the Lynx mailing list, about OpenSSL
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.