[gtk-vnc] Disable deprecation warnings
- From: Daniel P. Berrange <dberrange src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-vnc] Disable deprecation warnings
- Date: Thu, 31 Jan 2013 13:00:58 +0000 (UTC)
commit b9e1ccfd83471cea0101047f2707cdb40cf40a9a
Author: Daniel P. Berrange <berrange redhat com>
Date: Thu Jan 31 11:13:50 2013 +0000
Disable deprecation warnings
Glib deprecated GValueArray in favour of GArry
gvncviewer.c:450:9: warning: âg_value_array_get_nthâ is deprecated (declared at /usr/include/glib-2.0/gobject/gvaluearray.h:65): Use 'g_array_index' instead [-Wdeprecated-declarations]
Unfortunately these types are not ABI compatible. eg
compare the field orders
struct GValueArray {
guint n_values;
GValue *values;
};
vs
struct GArray {
gchar *data;
guint len;
};
So the replacement can't be used without a change in API
and ABI. This is unacceptable, so the deprecation warniings
must be disabled :-(
Signed-off-by: Daniel P. Berrange <berrange redhat com>
examples/Makefile.am | 2 +-
m4/gtk-vnc-warnings.m4 | 6 +++++-
plugin/Makefile.am | 2 +-
tools/Makefile.am | 2 +-
4 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/examples/Makefile.am b/examples/Makefile.am
index ee98cb0..b68de95 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -16,7 +16,7 @@ gvncviewer_LDADD += ../src/libgvncpulse-1.0.la
endif
gvncviewer_CFLAGS = $(GTK_CFLAGS) \
$(GIOUNIX_CFLAGS) \
- $(WARNING_CFLAGS) \
+ $(WARN_CFLAGS) \
$(VIEW_CFLAGS) -I$(top_srcdir)/src/
EXTRA_DIST = gvncviewer.py gvncviewer.js
diff --git a/m4/gtk-vnc-warnings.m4 b/m4/gtk-vnc-warnings.m4
index 9a94fff..e01d9d6 100644
--- a/m4/gtk-vnc-warnings.m4
+++ b/m4/gtk-vnc-warnings.m4
@@ -45,7 +45,6 @@ AC_DEFUN([GTK_VNC_COMPILE_WARNINGS],[
dontwarn="$dontwarn -Wstrict-prototypes"
# Generated vncmarshal.c file :-(
dontwarn="$dontwarn -Wunused-macros"
-
# Get all possible GCC warnings
gl_MANYWARN_ALL_GCC([maybewarn])
@@ -105,6 +104,11 @@ AC_DEFUN([GTK_VNC_COMPILE_WARNINGS],[
gl_WARN_ADD([-Wno-suggest-attribute=pure])
gl_WARN_ADD([-Wno-suggest-attribute=const])
+ # GLib deprecated some APIs with no ABI compatible
+ # replacement. As such we can't change & must ignore
+ # the warnings
+ gl_WARN_ADD([-Wno-deprecated-declarations])
+
if test "$set_werror" = "yes"
then
gl_WARN_ADD([-Werror])
diff --git a/plugin/Makefile.am b/plugin/Makefile.am
index c797c59..8b9b3db 100644
--- a/plugin/Makefile.am
+++ b/plugin/Makefile.am
@@ -12,7 +12,7 @@ gtk_vnc_plugin_la_LDFLAGS = \
-module -avoid-version
gtk_vnc_plugin_la_CFLAGS = \
-I$(top_srcdir)/src $(GTK_CFLAGS) \
- $(FIREFOX_PLUGIN_CFLAGS) $(WARNING_CFLAGS)
+ $(FIREFOX_PLUGIN_CFLAGS) $(WARN_CFLAGS)
all-local: gtk-vnc-plugin.so
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 62ca302..4c96c6e 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -19,7 +19,7 @@ gvnccapture_CFLAGS = \
-DPACKAGE_LOCALE_DIR=\""$(datadir)/locale"\" \
$(GOBJECT_CFLAGS) \
$(GDK_PIXBUF_CFLAGS) \
- $(WARNING_CFLAGS) \
+ $(WARN_CFLAGS) \
-I$(top_srcdir)/src/
-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]