Skip to content

Commit

Permalink
Reduce some of GCC 7's nagging
Browse files Browse the repository at this point in the history
Add fallthrough comments to tinyformat.hpp to disable
-Wimplicit-fallthrough warnings.

Also disable -Wattributes in embree, since it generates a lot of
warnings from that.
  • Loading branch information
CounterPillow committed Jun 2, 2017
1 parent 6bff292 commit 582b487
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/thirdparty/embree/common/cmake/gcc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ SET(FLAGS_AVX2 "-mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2")
SET(FLAGS_AVX512KNL "-mavx512f -mavx512pf -mavx512er -mavx512cd")
SET(FLAGS_AVX512SKX "-mavx512f -mavx512dq -mavx512cd -mavx512bw -mavx512vl")

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC -std=c++11 -fvisibility-inlines-hidden -fvisibility=hidden -fno-strict-aliasing -Wno-misleading-indentation -Wno-parentheses -Wno-unused-variable -Wno-unused-but-set-variable -Wno-sign-compare -Wno-maybe-uninitialized -Wno-terminate")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC -std=c++11 -fvisibility-inlines-hidden -fvisibility=hidden -fno-strict-aliasing -Wno-misleading-indentation -Wno-parentheses -Wno-unused-variable -Wno-unused-but-set-variable -Wno-sign-compare -Wno-maybe-uninitialized -Wno-terminate -Wno-attributes")
SET(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -DTBB_USE_DEBUG -g -O0")
SET(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3")
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DDEBUG -DTBB_USE_DEBUG -g -O3")
Expand Down
6 changes: 5 additions & 1 deletion src/thirdparty/tinyformat/tinyformat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -704,23 +704,27 @@ inline const char* streamStateFromFormat(std::ostream& out, bool& spacePadPositi
break;
case 'X':
out.setf(std::ios::uppercase);
// fallthrough
case 'x': case 'p':
out.setf(std::ios::hex, std::ios::basefield);
intConversion = true;
break;
case 'E':
out.setf(std::ios::uppercase);
// fallthrough
case 'e':
out.setf(std::ios::scientific, std::ios::floatfield);
out.setf(std::ios::dec, std::ios::basefield);
break;
case 'F':
out.setf(std::ios::uppercase);
//fallthrough
case 'f':
out.setf(std::ios::fixed, std::ios::floatfield);
break;
case 'G':
out.setf(std::ios::uppercase);
//fallthrough
case 'g':
out.setf(std::ios::dec, std::ios::basefield);
// As in boost::format, let stream decide float format.
Expand Down Expand Up @@ -1036,4 +1040,4 @@ TINYFORMAT_FOREACH_ARGNUM(TINYFORMAT_MAKE_FORMAT_FUNCS)

} // namespace tinyformat

#endif // TINYFORMAT_H_INCLUDED
#endif // TINYFORMAT_H_INCLUDED

0 comments on commit 582b487

Please sign in to comment.