Another attempt to fix clang warning

release/4.3a0
Richard Roberts 2013-11-19 15:25:58 +00:00
parent 5098003691
commit da47f8a9e8
1 changed files with 9 additions and 2 deletions

View File

@ -247,10 +247,14 @@ namespace gtsam {
};
/* ************************************************************************* */
#ifdef __clang__
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunused-private-field" // Clang complains that previousOpenMPThreads is unused in the #else case below
#endif
/// An object whose scope defines a block where TBB and OpenMP parallelism are mixed. In such a
/// block, we use default threads for TBB, and p/2 threads for OpenMP. If GTSAM is not compiled to
/// use both TBB and OpenMP, this has no effect.
CLANG_DIAGNOSTIC_PUSH_IGNORE("-Wunused-private-field") // Clang complains that previousOpenMPThreads is unused in the #else case below
class TbbOpenMPMixedScope
{
int previousOpenMPThreads;
@ -272,7 +276,10 @@ namespace gtsam {
~TbbOpenMPMixedScope() {}
#endif
};
CLANG_DIAGNOSTIC_POP()
#ifdef __clang__
# pragma clang diagnostic pop
#endif
}