Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[XrdPosix] Fix Clang -Wtautological-constant-out-of-range-compare war…
…ning src/XrdPosix/XrdPosixAdmin.cc:71:10: warning: result of comparison of constant 32940614417338485 with expression of type 'unsigned int' is always false [-Wtautological-constant-out-of-range-compare] if (i > std::numeric_limits<ptrdiff_t>::max() / sizeof(XrdCl::URL)) ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here std::numeric_limits<ptrdiff_t>::max() / sizeof(XrdCl::URL) == 32940614417338485, which is bigger than the largest unsigned int, therefore the comparison will always be false. We need i to be able to hold large enough values. Fixes 0dc292f.
- Loading branch information