[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 9de81b8 26/30: Avoid -Wsometimes-uninitialize
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 9de81b8 26/30: Avoid -Wsometimes-uninitialized clang warning in a test |
Date: |
Wed, 24 Mar 2021 15:31:11 -0400 (EDT) |
branch: master
commit 9de81b83183baf11c11332de77e422ecd8eb27f3
Author: Vadim Zeitlin <vadim@tt-solutions.com>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Avoid -Wsometimes-uninitialized clang warning in a test
This warning is sometimes given (can't be reproduced with Debian Sid
clang 10.0.1, but is given by Ubuntu Focal clang 10.0.0) when compiling
Boost header, so suppress it explicitly.
---
numeric_io_test.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/numeric_io_test.cpp b/numeric_io_test.cpp
index 3a8dd80..c828d66 100644
--- a/numeric_io_test.cpp
+++ b/numeric_io_test.cpp
@@ -29,8 +29,17 @@
#include "test_tools.hpp"
#include "timer.hpp"
+#if defined __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wsometimes-uninitialized"
+#endif // defined __clang__
+
#include <boost/lexical_cast.hpp>
+#if defined __clang__
+# pragma clang diagnostic pop
+#endif // defined __clang__
+
#include <cmath> // exp()
#include <limits>
#include <sstream>
- [lmi-commits] [lmi] master f5b317c 08/30: Don't skip path_utility_test unnecessarily in the CI builds, (continued)
- [lmi-commits] [lmi] master f5b317c 08/30: Don't skip path_utility_test unnecessarily in the CI builds, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master ecd3435 11/30: Default to x86_64-pc-linux-gnu LMI_TRIPLET in the CI builds, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 396441f 13/30: Use gcc_version value from the environment, if any, in scripts, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 91116f9 14/30: Suppress -Wdeprecated-copy in Boost headers for gcc9 too, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master dd0b2a63 16/30: Work around problem with executable files under .git in CI builds, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 1c6ac28 04/30: Simplify test targets definitions in Automake makefile, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master e859cc7 09/30: Test build using autotools in GitHub Actions CI workflow too, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master fc0987e 18/30: Disable clang-specific warning when compiling Boost libraries, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 815b26b 21/30: Show config.log if running configure for XML libraries failed, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 2663129 24/30: Ignore more warnings in Boost.Regex headers with clang, Greg Chicares, 2021/03/24
- [lmi-commits] [lmi] master 9de81b8 26/30: Avoid -Wsometimes-uninitialized clang warning in a test,
Greg Chicares <=