lmi-commits
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]