[Spice-devel] [spice-server 2/2] build: Cleanup disabled warnings a bit

Christophe Fergeau cfergeau at redhat.com
Mon Nov 14 09:47:23 UTC 2016


On Mon, Nov 14, 2016 at 04:42:46AM -0500, Frediano Ziglio wrote:
> > 
> > Some C-specific warnings were turned off as the spice module used to
> > ship a C++ spice client. It's long gone, so we can reenable these
> > warnings.
> > There were warnings disabled for tunnel support and CEGUI usage which
> > have both been removed too.
> > -Wno-format-nonliteral was disabled twice.
> 
> Tested with both RHEL6 and Fedora 24.
> 
> Acked-by: Frediano Ziglio <fziglio at redhat.com>
> 
> For me it's fine but I remember you did some comments and
> you were not quite satisfied with the patch so I'll wait for
> confirmation.

Commit log might be slightly inaccurate as looking again at the diff,
what is done is that c++ warnings are first disabled through
dontwarn="...", and then apparently reenabled with gl_WARN_ADD().

The log does not mention that at all, but I don't fully understand what
is being done, so can't improve it a lot. Imo it's fine as is even if a
bit misleading.

Christophe

> 
> Frediano
> 
> > ---
> >  m4/spice-compile-warnings.m4 | 33 ---------------------------------
> >  1 file changed, 33 deletions(-)
> > 
> > diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-warnings.m4
> > index 89bc992..2b8de54 100644
> > --- a/m4/spice-compile-warnings.m4
> > +++ b/m4/spice-compile-warnings.m4
> > @@ -71,18 +71,6 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
> >      # decl mess with  gtk/generated_*.c
> >      dontwarn="$dontwarn -Wmissing-declarations"
> >  
> > -    # Stuff that C++ won't allow. Turn them back on later
> > -    dontwarn="$dontwarn -Waggregate-return"
> > -    dontwarn="$dontwarn -Wstrict-prototypes"
> > -    dontwarn="$dontwarn -Wold-style-definition"
> > -    dontwarn="$dontwarn -Wnested-externs"
> > -    dontwarn="$dontwarn -Wformat-zero-length"
> > -    dontwarn="$dontwarn -Wpointer-to-int-cast"
> > -    dontwarn="$dontwarn -Wjump-misses-init"
> > -
> > -    # Issues in x11/platform_utils.cpp prevent us turning this on
> > -    dontwarn="$dontwarn -Wmissing-format-attribute"
> > -
> >      # Get all possible GCC warnings
> >      gl_MANYWARN_ALL_GCC([maybewarn])
> >  
> > @@ -103,15 +91,6 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
> >      # We can't enable this due to horrible spice_usb_device_get_description
> >      # signature
> >      gl_WARN_ADD([-Wno-format-nonliteral])
> > -    # CEGui headers cause violation of this
> > -    gl_WARN_ADD([-Wno-ignored-qualifiers])
> > -
> > -
> > -
> > -
> > -    # GNULIB turns on -Wformat=2 which implies -Wformat-nonliteral,
> > -    # so we need to manually re-exclude it.
> > -    gl_WARN_ADD([-Wno-format-nonliteral])
> >  
> >      # This should be < 1024 really. pixman_utils is the blackspot
> >      # preventing lower usage
> > @@ -158,18 +137,6 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
> >      WARN_CXXFLAGS=$WARN_CFLAGS
> >      AC_SUBST([WARN_CXXFLAGS])
> >  
> > -    # These are C-only warnings
> > -    if test "x$enable_tunnel" != "xyes"; then
> > -        # Slirp causes pain :-(
> > -        gl_WARN_ADD([-Waggregate-return])
> > -    fi
> > -    gl_WARN_ADD([-Wstrict-prototypes])
> > -    gl_WARN_ADD([-Wold-style-definition])
> > -    gl_WARN_ADD([-Wnested-externs])
> > -    gl_WARN_ADD([-Wformat-zero-length])
> > -    gl_WARN_ADD([-Wpointer-to-int-cast])
> > -    gl_WARN_ADD([-Wjump-misses-init])
> > -
> >      WARN_LDFLAGS=$WARN_CFLAGS
> >      AC_SUBST([WARN_CFLAGS])
> >      AC_SUBST([WARN_LDFLAGS])
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161114/aec032df/attachment.sig>


More information about the Spice-devel mailing list