-
Notifications
You must be signed in to change notification settings - Fork 163
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
Fixed warning cast between incompatible function types from FARPROC_ to gettickcount64_t #227
Conversation
src/win32/thread_primitives.cpp
Outdated
// GetProcAddress returned. | ||
// However, gcc warns about that. | ||
#if BOOST_COMP_GNUC | ||
#pragma GCC diagnostic push |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pragma diagnostic push/pop appeared only since gcc 4.6. You should check for the compiler version.
Also, you don't need Boost.Predef to detect gcc. You can use BOOST_GCC
from Boost.Config. Also, it is quite possible that clang also emits a similar warning, you can check for it with BOOST_CLANG
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot check for clang as I do not cross-compile to Windows with clang but I will use BOOST_GCC.
src/win32/thread_primitives.cpp
Outdated
// However, gcc warns about that. | ||
#if BOOST_COMP_GNUC | ||
#pragma GCC diagnostic push | ||
#pragma GCC diagnostic ignored "-Wcast-function-type" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning is only documented (and likely implemented) since gcc 8.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right, thanks. I will change that.
…to gettickcount64_t On Windows, GetProcAddress must be cast to something useful which generates a warning with gcc. This patch silents the warning. Fixes issue boostorg#225
I am very surprised by test failures in completely unrelated code.
Is it possible that the test server is so heavily loaded that 250 ms are not enough and |
It is possible, as with any other time-based test. |
Andrey is right. This kind of tests can unfortunately fail. |
How do you normally decide if a patch is harmless then? |
I need to check the kind of issue :( |
On Windows, GetProcAddress must be cast to something useful which
generates a warning with gcc. This patch silents the warning.
Fixes issue #225