Skip to content

Commit d8e27e1

Browse files
authored
Merge pull request #127 from pjohnmeyer/up_gcc_clang_warning_levels
Up non-MSVC warning levels
2 parents 1d0e157 + 7d7ba0a commit d8e27e1

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ if (${UTPP_AMPLIFY_WARNINGS})
3232
# we are dealing with an MSVC or MSVC-like compiler (e.g. Intel on Windows)
3333
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
3434
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
35+
else()
36+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Werror")
3537
endif()
3638
endif()
3739

UnitTest++/Posix/SignalTranslator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ namespace UnitTest {
2828
sigaction( SIGFPE, &action, &m_old_SIGFPE_action );
2929
sigaction( SIGTRAP, &action, &m_old_SIGTRAP_action );
3030
sigaction( SIGBUS, &action, &m_old_SIGBUS_action );
31-
sigaction( SIGILL, &action, &m_old_SIGBUS_action );
31+
sigaction( SIGILL, &action, &m_old_SIGILL_action );
3232
}
3333

3434
SignalTranslator::~SignalTranslator()
3535
{
36-
sigaction( SIGILL, &m_old_SIGBUS_action, 0 );
36+
sigaction( SIGILL, &m_old_SIGILL_action, 0 );
3737
sigaction( SIGBUS, &m_old_SIGBUS_action, 0 );
3838
sigaction( SIGTRAP, &m_old_SIGTRAP_action, 0 );
3939
sigaction( SIGFPE, &m_old_SIGFPE_action, 0 );

UnitTest++/Posix/SignalTranslator.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ namespace UnitTest {
2222
struct sigaction m_old_SIGTRAP_action;
2323
struct sigaction m_old_SIGSEGV_action;
2424
struct sigaction m_old_SIGBUS_action;
25-
struct sigaction m_old_SIGABRT_action;
26-
struct sigaction m_old_SIGALRM_action;
25+
struct sigaction m_old_SIGILL_action;
2726
};
2827

2928
#if !defined (__GNUC__)

tests/TestMemoryOutStream.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ using namespace std;
1111

1212
namespace {
1313

14-
const char* const maxSignedIntegralStr(size_t nBytes)
14+
const char* maxSignedIntegralStr(size_t nBytes)
1515
{
1616
switch(nBytes)
1717
{
@@ -28,7 +28,7 @@ namespace {
2828
}
2929
}
3030

31-
const char* const minSignedIntegralStr(size_t nBytes)
31+
const char* minSignedIntegralStr(size_t nBytes)
3232
{
3333
switch(nBytes)
3434
{
@@ -45,7 +45,7 @@ namespace {
4545
}
4646
}
4747

48-
const char* const maxUnsignedIntegralStr(size_t nBytes)
48+
const char* maxUnsignedIntegralStr(size_t nBytes)
4949
{
5050
switch(nBytes)
5151
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy