[Spice-commits] 2 commits - configure.ac src/channel-base.c src/channel-playback.c src/giopipe.c src/spice-gstaudio.c src/spice-uri.c src/spicy.c

Marc-André Lureau elmarco at kemper.freedesktop.org
Tue May 31 11:04:47 UTC 2016


 configure.ac           |    9 +--------
 src/channel-base.c     |   20 ++++++++++----------
 src/channel-playback.c |    1 +
 src/giopipe.c          |    6 +++++-
 src/spice-gstaudio.c   |    2 +-
 src/spice-uri.c        |    1 +
 src/spicy.c            |   13 +++++++++----
 7 files changed, 28 insertions(+), 24 deletions(-)

New commits:
commit 0c8c25b699a7bef40460b91117f5151e18e459c9
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Mon May 30 18:35:45 2016 +0200

    build-sys: remove some gtk+ 2.0 warnings flags
    
    As we dropped gtk+ 2.0 anyway.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>

diff --git a/configure.ac b/configure.ac
index c94d41b..3c90e9e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -585,13 +585,6 @@ dnl check compiler flags
 # decl mess with  src/generated_*.c
 dontwarn="-Wmissing-declarations"
 
-# We want to enable these, but Gtk+2.0 has a bad decl
-# gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function declaration
-# isn't a prototype.
-if test "$with_gtk" = "2.0"; then
-  dontwarn="$dontwarn -Wstrict-prototypes"
-fi
-
 SPICE_COMPILE_WARNINGS([$dontwarn])
 
 SPICE_CFLAGS="$SPICE_CFLAGS $WARN_CFLAGS"
commit d5e3a4a5c34fc4408298e824872c4ed511b4bb3c
Author: Marc-André Lureau <marcandre.lureau at gmail.com>
Date:   Mon May 30 18:33:01 2016 +0200

    build-sys: enable -Wmissing-prototypes
    
    Turns out it is possible to fix the warnings now.
    
    Signed-off-by: Marc-André Lureau <marcandre.lureau at gmail.com>

diff --git a/configure.ac b/configure.ac
index 7f29c66..c94d41b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -583,7 +583,7 @@ dnl check compiler flags
 
 # We want to enable these, but need to sort out the
 # decl mess with  src/generated_*.c
-dontwarn="-Wmissing-prototypes -Wmissing-declarations"
+dontwarn="-Wmissing-declarations"
 
 # We want to enable these, but Gtk+2.0 has a bad decl
 # gtk-2.0/gtk/gtkitemfactory.h:47:1: error: function declaration
diff --git a/src/channel-base.c b/src/channel-base.c
index de04b89..20bb0cc 100644
--- a/src/channel-base.c
+++ b/src/channel-base.c
@@ -24,8 +24,8 @@
 #include "spice-channel-priv.h"
 
 /* coroutine context */
-G_GNUC_INTERNAL
-void spice_channel_handle_set_ack(SpiceChannel *channel, SpiceMsgIn *in)
+static void
+spice_channel_handle_set_ack(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceChannelPrivate *c = channel->priv;
     SpiceMsgSetAck* ack = spice_msg_in_parsed(in);
@@ -40,8 +40,8 @@ void spice_channel_handle_set_ack(SpiceChannel *channel, SpiceMsgIn *in)
 }
 
 /* coroutine context */
-G_GNUC_INTERNAL
-void spice_channel_handle_ping(SpiceChannel *channel, SpiceMsgIn *in)
+static void
+spice_channel_handle_ping(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceChannelPrivate *c = channel->priv;
     SpiceMsgPing *ping = spice_msg_in_parsed(in);
@@ -52,8 +52,8 @@ void spice_channel_handle_ping(SpiceChannel *channel, SpiceMsgIn *in)
 }
 
 /* coroutine context */
-G_GNUC_INTERNAL
-void spice_channel_handle_notify(SpiceChannel *channel, SpiceMsgIn *in)
+static void
+spice_channel_handle_notify(SpiceChannel *channel, SpiceMsgIn *in)
 {
     static const char* severity_strings[] = {"info", "warn", "error"};
     static const char* visibility_strings[] = {"!", "!!", "!!!"};
@@ -82,8 +82,8 @@ void spice_channel_handle_notify(SpiceChannel *channel, SpiceMsgIn *in)
 }
 
 /* coroutine context */
-G_GNUC_INTERNAL
-void spice_channel_handle_disconnect(SpiceChannel *channel, SpiceMsgIn *in)
+static void
+spice_channel_handle_disconnect(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgDisconnect *disconnect = spice_msg_in_parsed(in);
 
@@ -148,8 +148,8 @@ get_msg_handler(SpiceChannel *channel, SpiceMsgIn *in, gpointer data)
 }
 
 /* coroutine context */
-G_GNUC_INTERNAL
-void spice_channel_handle_migrate(SpiceChannel *channel, SpiceMsgIn *in)
+static void
+spice_channel_handle_migrate(SpiceChannel *channel, SpiceMsgIn *in)
 {
     SpiceMsgOut *out;
     SpiceMsgIn *data = NULL;
diff --git a/src/channel-playback.c b/src/channel-playback.c
index e931727..8edcb22 100644
--- a/src/channel-playback.c
+++ b/src/channel-playback.c
@@ -25,6 +25,7 @@
 #include "spice-marshal.h"
 
 #include "common/snd_codec.h"
+#include "channel-playback-priv.h"
 
 /**
  * SECTION:channel-playback
diff --git a/src/giopipe.c b/src/giopipe.c
index d91c4d9..e76090c 100644
--- a/src/giopipe.c
+++ b/src/giopipe.c
@@ -81,6 +81,8 @@ static void pipe_input_stream_pollable_iface_init (GPollableInputStreamInterface
 static void pipe_input_stream_check_source (PipeInputStream *self);
 static void pipe_output_stream_check_source (PipeOutputStream *self);
 
+static GType pipe_input_stream_get_type(void);
+
 G_DEFINE_TYPE_WITH_CODE (PipeInputStream, pipe_input_stream, G_TYPE_INPUT_STREAM,
                          G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_INPUT_STREAM,
                                                 pipe_input_stream_pollable_iface_init))
@@ -267,6 +269,8 @@ pipe_input_stream_pollable_iface_init (GPollableInputStreamInterface *iface)
 
 static void pipe_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface);
 
+static GType pipe_output_stream_get_type(void);
+
 G_DEFINE_TYPE_WITH_CODE (PipeOutputStream, pipe_output_stream, G_TYPE_OUTPUT_STREAM,
                          G_IMPLEMENT_INTERFACE (G_TYPE_POLLABLE_OUTPUT_STREAM,
                                                 pipe_output_stream_pollable_iface_init))
@@ -438,7 +442,7 @@ pipe_output_stream_pollable_iface_init (GPollableOutputStreamInterface *iface)
     iface->create_source = pipe_output_stream_create_source;
 }
 
-G_GNUC_INTERNAL void
+static void
 make_gio_pipe(GInputStream **input, GOutputStream **output)
 {
     PipeInputStream *in;
diff --git a/src/spice-gstaudio.c b/src/spice-gstaudio.c
index 9a92452..12e6d66 100644
--- a/src/spice-gstaudio.c
+++ b/src/spice-gstaudio.c
@@ -66,7 +66,7 @@ static void spice_gstaudio_finalize(GObject *obj)
     G_OBJECT_CLASS(spice_gstaudio_parent_class)->finalize(obj);
 }
 
-void stream_dispose(struct stream *s)
+static void stream_dispose(struct stream *s)
 {
     if (s->pipe) {
         gst_element_set_state(s->pipe, GST_STATE_NULL);
diff --git a/src/spice-uri.c b/src/spice-uri.c
index 8cf870d..3bdb502 100644
--- a/src/spice-uri.c
+++ b/src/spice-uri.c
@@ -22,6 +22,7 @@
 
 #include "spice-client.h"
 #include "spice-uri.h"
+#include "spice-uri-priv.h"
 
 /**
  * SECTION:spice-uri
diff --git a/src/spicy.c b/src/spicy.c
index cbd8e8b..d984f62 100644
--- a/src/spicy.c
+++ b/src/spicy.c
@@ -84,6 +84,8 @@ struct _SpiceWindowClass
   GObjectClass parent_class;
 };
 
+static GType spice_window_get_type(void);
+
 G_DEFINE_TYPE (SpiceWindow, spice_window, G_TYPE_OBJECT);
 
 #define CHANNELID_MAX 4
@@ -1501,14 +1503,16 @@ static void dialog_response_cb(GtkDialog *dialog,
     }
 }
 
-void task_cancel_cb(GtkButton *button,
-                    gpointer user_data)
+static void
+task_cancel_cb(GtkButton *button,
+               gpointer user_data)
 {
     SpiceFileTransferTask *task = SPICE_FILE_TRANSFER_TASK(user_data);
     spice_file_transfer_task_cancel(task);
 }
 
-TransferTaskWidgets *transfer_task_widgets_new(SpiceFileTransferTask *task)
+static TransferTaskWidgets *
+transfer_task_widgets_new(SpiceFileTransferTask *task)
 {
     TransferTaskWidgets *widgets = g_new0(TransferTaskWidgets, 1);
 
@@ -1544,7 +1548,8 @@ TransferTaskWidgets *transfer_task_widgets_new(SpiceFileTransferTask *task)
     return widgets;
 }
 
-void transfer_task_widgets_free(TransferTaskWidgets *widgets)
+static void
+transfer_task_widgets_free(TransferTaskWidgets *widgets)
 {
     /* child widgets will be destroyed automatically */
     gtk_widget_destroy(widgets->vbox);


More information about the Spice-commits mailing list