boostorg / interprocess

Boost.org interprocess module
http://boost.org/libs/interprocess
134 stars 117 forks source link

clang-8 warning: result of comparison of constant 223372036854775807 with expression of type 'std::size_t' (aka 'unsigned int') is always false #181

Closed k15tfu closed 2 years ago

k15tfu commented 2 years ago

Hi!

In file boost/interprocess/detail/os_file_functions.hpp:

boost/interprocess/detail/os_file_functions.hpp:592:51: error: result of comparison of constant 9223372036854775807 with expression of type
      'std::size_t' (aka 'unsigned int') is always false [-Werror,-Wtautological-constant-out-of-range-compare]
   if(uoff_t((std::numeric_limits<off_t>::max)()) < size){
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~
1 error generated.
igaztanaga commented 2 years ago

Let's hope fixes your case, I have no access to the code the provokes the warning...