Skip to content

Commit 582b487

Browse files
committed
Reduce some of GCC 7's nagging
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.
1 parent 6bff292 commit 582b487

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/thirdparty/embree/common/cmake/gcc.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ SET(FLAGS_AVX2 "-mf16c -mavx2 -mfma -mlzcnt -mbmi -mbmi2")
2424
SET(FLAGS_AVX512KNL "-mavx512f -mavx512pf -mavx512er -mavx512cd")
2525
SET(FLAGS_AVX512SKX "-mavx512f -mavx512dq -mavx512cd -mavx512bw -mavx512vl")
2626

27-
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")
27+
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")
2828
SET(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG -DTBB_USE_DEBUG -g -O0")
2929
SET(CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O3")
3030
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DDEBUG -DTBB_USE_DEBUG -g -O3")

src/thirdparty/tinyformat/tinyformat.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,23 +704,27 @@ inline const char* streamStateFromFormat(std::ostream& out, bool& spacePadPositi
704704
break;
705705
case 'X':
706706
out.setf(std::ios::uppercase);
707+
// fallthrough
707708
case 'x': case 'p':
708709
out.setf(std::ios::hex, std::ios::basefield);
709710
intConversion = true;
710711
break;
711712
case 'E':
712713
out.setf(std::ios::uppercase);
714+
// fallthrough
713715
case 'e':
714716
out.setf(std::ios::scientific, std::ios::floatfield);
715717
out.setf(std::ios::dec, std::ios::basefield);
716718
break;
717719
case 'F':
718720
out.setf(std::ios::uppercase);
721+
//fallthrough
719722
case 'f':
720723
out.setf(std::ios::fixed, std::ios::floatfield);
721724
break;
722725
case 'G':
723726
out.setf(std::ios::uppercase);
727+
//fallthrough
724728
case 'g':
725729
out.setf(std::ios::dec, std::ios::basefield);
726730
// As in boost::format, let stream decide float format.
@@ -1036,4 +1040,4 @@ TINYFORMAT_FOREACH_ARGNUM(TINYFORMAT_MAKE_FORMAT_FUNCS)
10361040

10371041
} // namespace tinyformat
10381042

1039-
#endif // TINYFORMAT_H_INCLUDED
1043+
#endif // TINYFORMAT_H_INCLUDED

0 commit comments

Comments
 (0)