@amadio commented on this pull request.
In src/XrdPosix/XrdPosixAdmin.cc:
> @@ -51,7 +51,7 @@ XrdCl::URL *XrdPosixAdmin::FanOut(int &num) XrdCl::URL *uVec; XrdNetAddr netLoc; const char *hName; - unsigned int i; + unsigned long i;
It's not clang that needs it, it just warns that the condition i > std::numeric_limits<ptrdiff_t>::max() / sizeof(XrdCl::URL)
in the if
below is never going to trigger because std::numeric_limits<ptrdiff_t>::max() / sizeof(XrdCl::URL)
is much larger than the largest int
. We are checking there that we are not trying to allocate more memory (i.e. i * sizeof(XrdCl::URL)
) than std::numeric_limits<ptrdiff_t>::max()
bytes, but we can only do so if i
can actually hold up to that value itself. The "solution" is to make i
big enough for that.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
Use REPLY-ALL to reply to list
To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1