[vte] regex: Silence compiler warning



commit 549166627c077412b3fee2a248a33e497bd24b34
Author: Christian Persch <chpe src gnome org>
Date:   Thu Sep 27 18:07:50 2018 +0200

    regex: Silence compiler warning
    
    The function cast is fine, but -Wcast-function-type warns about it
    with recent gcc / recent glib.

 src/vteregex.cc | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/vteregex.cc b/src/vteregex.cc
index d9c48418..334b5811 100644
--- a/src/vteregex.cc
+++ b/src/vteregex.cc
@@ -104,8 +104,11 @@ set_gerror_from_pcre_error(int errcode,
         return FALSE;
 }
 
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-function-type"
 G_DEFINE_BOXED_TYPE(VteRegex, vte_regex,
                     vte_regex_ref, (GBoxedFreeFunc)vte_regex_unref)
+#pragma GCC diagnostic pop
 
 G_DEFINE_QUARK(vte-regex-error, vte_regex_error)
 


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