coroutine icon indicating copy to clipboard operation
coroutine copied to clipboard

Suppressing -Wsign-conversion warnings

Open the-moisrex opened this issue 2 years ago • 0 comments

Casting them out will fix the problem easily. I've also opened a pull request for Boost::const warnings as well.

g++ (GCC) 13.2.1 20230801

[17/27] Building CXX object _deps/boost_context-build/CMakeFiles/boost_context.dir/src/posix/stack_traits.cpp.o
/webpp/build-dev-clang/_deps/boost_context-src/src/posix/stack_traits.cpp:42:12: warning: implicit conversion changes signedness: 'long' to 'std::size_t' (aka 'unsigned long') [-Wsign-conversion]
    return ::sysconf( _SC_PAGESIZE);
    ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~
/webpp/build-dev-clang/_deps/boost_context-src/src/posix/stack_traits.cpp:80:12: warning: implicit conversion changes signedness: 'long' to 'std::size_t' (aka 'unsigned long') [-Wsign-conversion]
    return MINSIGSTKSZ;
    ~~~~~~ ^~~~~~~~~~~
/usr/include/bits/sigstksz.h:32:22: note: expanded from macro 'MINSIGSTKSZ'
# define MINSIGSTKSZ SIGSTKSZ
                     ^~~~~~~~
/usr/include/bits/sigstksz.h:28:19: note: expanded from macro 'SIGSTKSZ'
# define SIGSTKSZ sysconf (_SC_SIGSTKSZ)
                  ^~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.
[19/27] Building CXX object _deps/boost_coroutine-build/CMakeFiles/boost_coroutine.dir/src/posix/stack_traits.cpp.o
/webpp/build-dev-clang/_deps/boost_coroutine-src/src/posix/stack_traits.cpp:38:12: warning: implicit conversion changes signedness: 'long' to 'std::size_t' (aka 'unsigned long') [-Wsign-conversion]
    return ::sysconf( _SC_PAGESIZE);
    ~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~
/webpp/build-dev-clang/_deps/boost_coroutine-src/src/posix/stack_traits.cpp:89:10: warning: implicit conversion changes signedness: 'long' to 'std::size_t' (aka 'unsigned long') [-Wsign-conversion]
{ return SIGSTKSZ; }
  ~~~~~~ ^~~~~~~~
/usr/include/bits/sigstksz.h:28:19: note: expanded from macro 'SIGSTKSZ'
# define SIGSTKSZ sysconf (_SC_SIGSTKSZ)
                  ^~~~~~~~~~~~~~~~~~~~~~
2 warnings generated.

the-moisrex avatar Oct 29 '23 05:10 the-moisrex