Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppressing -Wsign-conversion warnings #244

Merged
merged 1 commit into from
Nov 8, 2023
Merged

Conversation

the-moisrex
Copy link
Contributor

Casting them out will fix the problem easily. I'm also gonna open a pull request for Boost::coroutine 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.

@olk olk merged commit 0bf820b into boostorg:develop Nov 8, 2023
21 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants