[vte] regex: Only silence warning on GCC



commit f88efe23e25f88b2ade06f6c4a4f0dde3d6070a4
Author: Christian Persch <chpe src gnome org>
Date:   Fri Sep 28 12:17:40 2018 +0200

    regex: Only silence warning on GCC
    
    clang doesn't know this warning, so silencing it results in
    another warning.

 src/vteregex.cc | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/vteregex.cc b/src/vteregex.cc
index 334b5811..7f6fb904 100644
--- a/src/vteregex.cc
+++ b/src/vteregex.cc
@@ -105,7 +105,9 @@ set_gerror_from_pcre_error(int errcode,
 }
 
 #pragma GCC diagnostic push
+#if defined(__GNUC__) && !defined(__clang__)
 #pragma GCC diagnostic ignored "-Wcast-function-type"
+#endif
 G_DEFINE_BOXED_TYPE(VteRegex, vte_regex,
                     vte_regex_ref, (GBoxedFreeFunc)vte_regex_unref)
 #pragma GCC diagnostic pop


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]