Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
googletest
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
googletest
Commits
447ed647
Commit
447ed647
authored
Jul 14, 2010
by
vladlosev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes warnings when built by GCC with -Wswitch-default. Original patch by Zhixu…
Fixes warnings when built by GCC with -Wswitch-default. Original patch by Zhixu Liu (zhixu.liu@gmail.com).
parent
3899557c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
4 deletions
+6
-4
internal_utils.cmake
cmake/internal_utils.cmake
+1
-1
gtest-death-test-internal.h
include/gtest/internal/gtest-death-test-internal.h
+2
-0
gtest-port.h
include/gtest/internal/gtest-port.h
+1
-1
gtest.cc
src/gtest.cc
+2
-2
No files found.
cmake/internal_utils.cmake
View file @
447ed647
...
...
@@ -54,7 +54,7 @@ elseif (CMAKE_COMPILER_IS_GNUCXX)
# whether RTTI is enabled. Therefore we define GTEST_HAS_RTTI
# explicitly.
set
(
cxx_no_rtti_flags
"-fno-rtti -DGTEST_HAS_RTTI=0"
)
set
(
cxx_strict_flags
"-Wextra"
)
set
(
cxx_strict_flags
"-Wextra
-Wswitch-default
"
)
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"SunPro"
)
set
(
cxx_exception_flags
"-features=except"
)
# Sun Pro doesn't provide macros to indicate whether exceptions and
...
...
include/gtest/internal/gtest-death-test-internal.h
View file @
447ed647
...
...
@@ -176,6 +176,8 @@ GTEST_API_ bool ExitedUnsuccessfully(int exit_status);
gtest_dt->Abort(::testing::internal::DeathTest::TEST_DID_NOT_DIE); \
break; \
} \
default: \
break; \
} \
} \
} else \
...
...
include/gtest/internal/gtest-port.h
View file @
447ed647
...
...
@@ -535,7 +535,7 @@
#ifdef __INTEL_COMPILER
#define GTEST_AMBIGUOUS_ELSE_BLOCKER_
#else
#define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0: // NOLINT
#define GTEST_AMBIGUOUS_ELSE_BLOCKER_ switch (0) case 0:
default:
// NOLINT
#endif
// Use this annotation at the end of a struct/class definition to
...
...
src/gtest.cc
View file @
447ed647
...
...
@@ -2504,9 +2504,9 @@ static const char * TestPartResultTypeToString(TestPartResult::Type type) {
#else
return
"Failure
\n
"
;
#endif
default
:
return
"Unknown result type"
;
}
return
"Unknown result type"
;
}
// Prints a TestPartResult to a String.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment