[Spice-commits] server/display-channel.c server/display-channel.h server/glz-encoder-dict.c server/glz-encoder-dict.h server/red-channel.c server/red-channel.h server/red-client.c server/red-client.h

Christophe Fergau teuf at kemper.freedesktop.org
Wed Apr 5 10:40:08 UTC 2017


 server/display-channel.c  |    2 +-
 server/display-channel.h  |    2 --
 server/glz-encoder-dict.c |    5 ++++-
 server/glz-encoder-dict.h |    3 ---
 server/red-channel.c      |    5 +++--
 server/red-channel.h      |    5 -----
 server/red-client.c       |    2 +-
 server/red-client.h       |    1 -
 8 files changed, 9 insertions(+), 16 deletions(-)

New commits:
commit 78c3dd4c181d0a955f180727a9c39a755bdb60b2
Author: Christophe Fergeau <cfergeau at redhat.com>
Date:   Tue Feb 28 16:51:46 2017 +0100

    Make various functions static
    
    - glz_enc_dictionary_reset
    - monitors_config_new
    - red_channel_any_blocked
    - red_channel_no_item_being_sent
    - red_client_get_channel
    
    are only used in the file where they are defined, so they can as well be
    static.
    
    Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/display-channel.c b/server/display-channel.c
index a35145cc..0d5b9727 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -153,7 +153,7 @@ static void monitors_config_debug(MonitorsConfig *mc)
                     mc->heads[i].width, mc->heads[i].height);
 }
 
-MonitorsConfig* monitors_config_new(QXLHead *heads, ssize_t nheads, ssize_t max)
+static MonitorsConfig* monitors_config_new(QXLHead *heads, ssize_t nheads, ssize_t max)
 {
     MonitorsConfig *mc;
 
diff --git a/server/display-channel.h b/server/display-channel.h
index 796b0203..436cd33e 100644
--- a/server/display-channel.h
+++ b/server/display-channel.h
@@ -141,8 +141,6 @@ typedef struct RedMonitorsConfigItem {
     MonitorsConfig *monitors_config;
 } RedMonitorsConfigItem;
 
-MonitorsConfig*            monitors_config_new                       (QXLHead *heads, ssize_t nheads,
-                                                                      ssize_t max);
 MonitorsConfig *           monitors_config_ref                       (MonitorsConfig *config);
 void                       monitors_config_unref                     (MonitorsConfig *config);
 
diff --git a/server/glz-encoder-dict.c b/server/glz-encoder-dict.c
index 1f81a6dd..4b0a422a 100644
--- a/server/glz-encoder-dict.c
+++ b/server/glz-encoder-dict.c
@@ -26,6 +26,8 @@
 #include "glz-encoder-dict.h"
 #include "glz-encoder-priv.h"
 
+static void glz_enc_dictionary_reset(GlzEncDictContext *opaque_dict, GlzEncoderUsrContext *usr);
+
 /* turning all used images to free ones. If they are alive, calling the free_image callback for
    each one */
 static inline void __glz_dictionary_window_reset_images(SharedDictionary *dict)
@@ -201,7 +203,8 @@ GlzEncDictContext *glz_enc_dictionary_restore(GlzEncDictRestoreData *restore_dat
     return ((GlzEncDictContext *)ret);
 }
 
-void glz_enc_dictionary_reset(GlzEncDictContext *opaque_dict, GlzEncoderUsrContext *usr)
+/*  NOTE - you should use this routine only when no encoder uses the dictionary. */
+static void glz_enc_dictionary_reset(GlzEncDictContext *opaque_dict, GlzEncoderUsrContext *usr)
 {
     SharedDictionary *dict = (SharedDictionary *)opaque_dict;
     dict->cur_usr = usr;
diff --git a/server/glz-encoder-dict.h b/server/glz-encoder-dict.h
index f333412f..313ef9ac 100644
--- a/server/glz-encoder-dict.h
+++ b/server/glz-encoder-dict.h
@@ -60,9 +60,6 @@ void glz_enc_dictionary_get_restore_data(GlzEncDictContext *opaque_dict,
 GlzEncDictContext *glz_enc_dictionary_restore(GlzEncDictRestoreData *restore_data,
                                               GlzEncoderUsrContext *usr);
 
-/*  NOTE - you should use this routine only when no encoder uses the dictionary. */
-void glz_enc_dictionary_reset(GlzEncDictContext *opaque_dict, GlzEncoderUsrContext *usr);
-
 /* image: the context returned by the encoder when the image was encoded.
    NOTE - you should use this routine only when no encoder uses the dictionary.*/
 void glz_enc_dictionary_remove_image(GlzEncDictContext *opaque_dict,
diff --git a/server/red-channel.c b/server/red-channel.c
index 91c0dee1..21630669 100644
--- a/server/red-channel.c
+++ b/server/red-channel.c
@@ -538,7 +538,8 @@ bool red_channel_all_blocked(RedChannel *channel)
     return TRUE;
 }
 
-bool red_channel_any_blocked(RedChannel *channel)
+/* return TRUE if any of the connected clients to this channel are blocked */
+static bool red_channel_any_blocked(RedChannel *channel)
 {
     GListIter iter;
     RedChannelClient *rcc;
@@ -551,7 +552,7 @@ bool red_channel_any_blocked(RedChannel *channel)
     return FALSE;
 }
 
-bool red_channel_no_item_being_sent(RedChannel *channel)
+static bool red_channel_no_item_being_sent(RedChannel *channel)
 {
     GListIter iter;
     RedChannelClient *rcc;
diff --git a/server/red-channel.h b/server/red-channel.h
index 38289c48..cc116396 100644
--- a/server/red-channel.h
+++ b/server/red-channel.h
@@ -178,11 +178,6 @@ void red_channel_pipes_add_empty_msg(RedChannel *channel, int msg_type);
 /* return TRUE if all of the connected clients to this channel are blocked */
 bool red_channel_all_blocked(RedChannel *channel);
 
-/* return TRUE if any of the connected clients to this channel are blocked */
-bool red_channel_any_blocked(RedChannel *channel);
-
-bool red_channel_no_item_being_sent(RedChannel *channel);
-
 // TODO: unstaticed for display/cursor channels. they do some specific pushes not through
 // adding elements or on events. but not sure if this is actually required (only result
 // should be that they ""try"" a little harder, but if the event system is correct it
diff --git a/server/red-client.c b/server/red-client.c
index de40acfb..6dd18609 100644
--- a/server/red-client.c
+++ b/server/red-client.c
@@ -226,7 +226,7 @@ void red_client_destroy(RedClient *client)
 
 
 /* client->lock should be locked */
-RedChannelClient *red_client_get_channel(RedClient *client, int type, int id)
+static RedChannelClient *red_client_get_channel(RedClient *client, int type, int id)
 {
     GListIter iter;
     RedChannelClient *rcc;
diff --git a/server/red-client.h b/server/red-client.h
index 28c4eb44..20e2dc26 100644
--- a/server/red-client.h
+++ b/server/red-client.h
@@ -48,7 +48,6 @@ void red_client_destroy(RedClient *client);
 
 gboolean red_client_add_channel(RedClient *client, RedChannelClient *rcc, GError **error);
 void red_client_remove_channel(RedChannelClient *rcc);
-RedChannelClient *red_client_get_channel(RedClient *client, int type, int id);
 
 MainChannelClient *red_client_get_main(RedClient *client);
 // main should be set once before all the other channels are created


More information about the Spice-commits mailing list