[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 6143242 06/10: Use a pragma to inhibit certai
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 6143242 06/10: Use a pragma to inhibit certain warnings in a single TU |
Date: |
Mon, 8 Jun 2020 19:22:01 -0400 (EDT) |
branch: master
commit 61432429678d38824fafcceafaf881fc862da469
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>
Use a pragma to inhibit certain warnings in a single TU
Either way has its advantages. This change is just one step toward a
different style preference, which may someday seem regrettable.
---
md5.cpp | 6 ++++++
workhorse.make | 3 ---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/md5.cpp b/md5.cpp
index 67090ce..8431796 100644
--- a/md5.cpp
+++ b/md5.cpp
@@ -88,6 +88,12 @@
# define SWAP(n) (n)
#endif // !defined WORDS_BIGENDIAN
+#if defined __GNUC__ && !defined __clang__
+# if 7 <= __GNUC__
+# pragma GCC diagnostic ignored "-Wuseless-cast"
+# endif // 7 <= __GNUC__
+#endif // defined __GNUC__ && !defined __clang__
+
/* This array contains the bytes used to pad the buffer to the next
* 64-byte boundary. (RFC 1321, 3.1: Step 1)
*/
diff --git a/workhorse.make b/workhorse.make
index ccc553b..3e122e2 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -568,9 +568,6 @@ bourn_cast_test.o: gcc_common_extra_warnings += \
currency_test.o: gcc_common_extra_warnings += \
-Wno-useless-cast \
-md5.o: gcc_common_extra_warnings += \
- -Wno-useless-cast \
-
# Boost didn't remove an unused parameter in this file, which also
# seems to contain a "maybe-uninitialized" variable--see:
# http://lists.nongnu.org/archive/html/lmi/2016-12/msg00080.html
- [lmi-commits] [lmi] master updated (47ba720 -> ad6ea6c), Greg Chicares, 2020/06/08
- [lmi-commits] [lmi] master 7a98051c0 01/10: Enable five more warnings, Greg Chicares, 2020/06/08
- [lmi-commits] [lmi] master eb410dd 02/10: Remove a useless cast, Greg Chicares, 2020/06/08
- [lmi-commits] [lmi] master 857ca63 03/10: Move a pragma to a more appropriate place, Greg Chicares, 2020/06/08
- [lmi-commits] [lmi] master 6143242 06/10: Use a pragma to inhibit certain warnings in a single TU,
Greg Chicares <=
- [lmi-commits] [lmi] master cddcbaa 09/10: Purge three classes of warnings that are no longer needed, Greg Chicares, 2020/06/08
- [lmi-commits] [lmi] master ad6ea6c 10/10: Remove pragmata rendered unnecessary by '-isystem', Greg Chicares, 2020/06/08
- [lmi-commits] [lmi] master 67e9fd6 04/10: Disable '-Wswitch-enum' in 'boost_regex.hpp', Greg Chicares, 2020/06/08
- [lmi-commits] [lmi] master 4b93a16 07/10: Consolidate and simplify '-Wno-' options for boost filesystem, Greg Chicares, 2020/06/08
- [lmi-commits] [lmi] master b9adeb4 08/10: Consolidate and simplify '-Wno-' options for cgicc, Greg Chicares, 2020/06/08
- [lmi-commits] [lmi] master 272d69d 05/10: Purge a class of warnings that is no longer needed, Greg Chicares, 2020/06/08