[Spice-devel,client,01/10] build-sys: Enable deprecation warnings instead of ignoring them entirely

Submitted by Francois Gouget on Oct. 18, 2016, 5:46 p.m.

Details

Message ID c25e3da7a0ea2038f5926a6a178d043388cdbfa5.1476810638.git.fgouget@free.fr
State New
Headers show
Series "Deprecation warning cleanup" ( rev: 1 ) in Spice

Not browsing as part of any series.

Commit Message

Francois Gouget Oct. 18, 2016, 5:46 p.m.
For Spice-gtk most deprecation issues come from changes outside Spice
(GLib) and thus should not be treated as errors to not break
compilation for users who have newer third-party libraries.
However they must be visible otherwise Spice developers will not be
aware of them and thus will not fix them before breakage happens.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
---
 m4/spice-compile-warnings.m4 | 2 +-
 src/controller/Makefile.am   | 1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-warnings.m4
index 533bac6..dfa88fe 100644
--- a/m4/spice-compile-warnings.m4
+++ b/m4/spice-compile-warnings.m4
@@ -85,7 +85,7 @@  AC_DEFUN([SPICE_COMPILE_WARNINGS],[
     gl_WARN_ADD([-Wno-format-nonliteral])
     # We use some deprecated functions to avoid #ifdef hell while maintaining
     # compat with older gtk / glib versions
-    gl_WARN_ADD([-Wno-deprecated-declarations])
+    gl_WARN_ADD([-Wno-error=deprecated-declarations])
 
 
 
diff --git a/src/controller/Makefile.am b/src/controller/Makefile.am
index fb56986..00552e8 100644
--- a/src/controller/Makefile.am
+++ b/src/controller/Makefile.am
@@ -4,7 +4,6 @@  AM_CPPFLAGS =					\
 	-DG_LOG_DOMAIN=\"GSpiceController\"	\
 	$(GIO_CFLAGS)				\
 	$(COMMON_CFLAGS)			\
-	-Wno-deprecated-declarations		\
 	$(NULL)
 
 # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html

Comments

Hi,

this should be the last patch to avoid any compilation issues

On Tue, 2016-10-18 at 19:46 +0200, Francois Gouget wrote:
> For Spice-gtk most deprecation issues come from changes outside
> Spice
> (GLib) and thus should not be treated as errors to not break
> compilation for users who have newer third-party libraries.
> However they must be visible otherwise Spice developers will not be
> aware of them and thus will not fix them before breakage happens.
> 
> Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
> ---
>  m4/spice-compile-warnings.m4 | 2 +-
>  src/controller/Makefile.am   | 1 -
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-
> warnings.m4
> index 533bac6..dfa88fe 100644
> --- a/m4/spice-compile-warnings.m4
> +++ b/m4/spice-compile-warnings.m4
> @@ -85,7 +85,7 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
>      gl_WARN_ADD([-Wno-format-nonliteral])
>      # We use some deprecated functions to avoid #ifdef hell while
> maintaining
>      # compat with older gtk / glib versions
> -    gl_WARN_ADD([-Wno-deprecated-declarations])
> +    gl_WARN_ADD([-Wno-error=deprecated-declarations])
>  
>  
>  
> diff --git a/src/controller/Makefile.am b/src/controller/Makefile.am
> index fb56986..00552e8 100644
> --- a/src/controller/Makefile.am
> +++ b/src/controller/Makefile.am
> @@ -4,7 +4,6 @@ AM_CPPFLAGS =					
> \
>  	-DG_LOG_DOMAIN=\"GSpiceController\"	\
>  	$(GIO_CFLAGS)				\
>  	$(COMMON_CFLAGS)			\
> -	-Wno-deprecated-declarations		\

we should keep it, because we don't have much control over the
generated C code by vala 

Pavel

>  	$(NULL)
>  
>  # http://www.gnu.org/software/libtool/manual/html_node/Updating-ver
> sion-info.html
On Wed, 19 Oct 2016, Pavel Grunt wrote:

> Hi,
> 
> this should be the last patch to avoid any compilation issues

Note that this does not create any compilation errors, only compilation 
warnings. So putting it first will not break compilation and will show 
the warnings being fixed as each other patch gets applied.

Also the patches that locally disable the warnings are useless if this 
patch is not applied. I usually prefer to avoid committing such dead 
code hence the reverse order.

But I'm not dead set on a specific order. In fact I believe these 
patches can really be committed in any order without breaking the build. 
So feel free to reorder them to taste.


> > -     -Wno-deprecated-declarations            \
>
> we should keep it, because we don't have much control over the
> generated C code by vala 

Ah. Sure if it's vala that needs fixing we should disable the warnings 
it generates.