boostorg / thread

Boost.org thread module
http://boost.org/libs/thread
197 stars 162 forks source link

Fix -Wsign-compare warning with glibc 2.34 on Linux platforms. #354

Closed Romain-Geissler-1A closed 2 years ago

Romain-Geissler-1A commented 2 years ago
In file included from /data/mwrep/res/osp/Boost/21-0-0-0/include/boost/thread/thread_only.hpp:17,
                 from /data/mwrep/res/osp/Boost/21-0-0-0/include/boost/thread/thread.hpp:12,
                 from src/GetTest.cpp:12:
/data/mwrep/res/osp/Boost/21-0-0-0/include/boost/thread/pthread/thread_data.hpp: In member function 'void boost::thread_attributes::set_stack_size(std::size_t)':
/data/mwrep/res/osp/Boost/21-0-0-0/include/boost/thread/pthread/thread_data.hpp:61:19: error: comparison of integer expressions of different signedness: 'std::size_t' {aka 'long unsigned int'} and 'long int' [-Werror=sign-compare]
   61 |           if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
      |                   ^
Lastique commented 2 years ago

@pdimov Could we merge this please, so that it makes it into 1.78? These warnings are annoying.

Lastique commented 2 years ago

Thanks.