mirror of
https://github.com/unittest-cpp/unittest-cpp
synced 2026-09-26 16:19:30 +03:00
Merge pull request #127 from pjohnmeyer/up_gcc_clang_warning_levels
Up non-MSVC warning levels
This commit is contained in:
commit
d8e27e1825
4 changed files with 8 additions and 7 deletions
|
|
@ -32,6 +32,8 @@ if (${UTPP_AMPLIFY_WARNINGS})
|
|||
# we are dealing with an MSVC or MSVC-like compiler (e.g. Intel on Windows)
|
||||
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
|
|
|||
|
|
@ -28,12 +28,12 @@ namespace UnitTest {
|
|||
sigaction( SIGFPE, &action, &m_old_SIGFPE_action );
|
||||
sigaction( SIGTRAP, &action, &m_old_SIGTRAP_action );
|
||||
sigaction( SIGBUS, &action, &m_old_SIGBUS_action );
|
||||
sigaction( SIGILL, &action, &m_old_SIGBUS_action );
|
||||
sigaction( SIGILL, &action, &m_old_SIGILL_action );
|
||||
}
|
||||
|
||||
SignalTranslator::~SignalTranslator()
|
||||
{
|
||||
sigaction( SIGILL, &m_old_SIGBUS_action, 0 );
|
||||
sigaction( SIGILL, &m_old_SIGILL_action, 0 );
|
||||
sigaction( SIGBUS, &m_old_SIGBUS_action, 0 );
|
||||
sigaction( SIGTRAP, &m_old_SIGTRAP_action, 0 );
|
||||
sigaction( SIGFPE, &m_old_SIGFPE_action, 0 );
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ namespace UnitTest {
|
|||
struct sigaction m_old_SIGTRAP_action;
|
||||
struct sigaction m_old_SIGSEGV_action;
|
||||
struct sigaction m_old_SIGBUS_action;
|
||||
struct sigaction m_old_SIGABRT_action;
|
||||
struct sigaction m_old_SIGALRM_action;
|
||||
struct sigaction m_old_SIGILL_action;
|
||||
};
|
||||
|
||||
#if !defined (__GNUC__)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ using namespace std;
|
|||
|
||||
namespace {
|
||||
|
||||
const char* const maxSignedIntegralStr(size_t nBytes)
|
||||
const char* maxSignedIntegralStr(size_t nBytes)
|
||||
{
|
||||
switch(nBytes)
|
||||
{
|
||||
|
|
@ -28,7 +28,7 @@ namespace {
|
|||
}
|
||||
}
|
||||
|
||||
const char* const minSignedIntegralStr(size_t nBytes)
|
||||
const char* minSignedIntegralStr(size_t nBytes)
|
||||
{
|
||||
switch(nBytes)
|
||||
{
|
||||
|
|
@ -45,7 +45,7 @@ namespace {
|
|||
}
|
||||
}
|
||||
|
||||
const char* const maxUnsignedIntegralStr(size_t nBytes)
|
||||
const char* maxUnsignedIntegralStr(size_t nBytes)
|
||||
{
|
||||
switch(nBytes)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue