[PATCH] Make some function static

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/dcc-encoders.c    |  7 +++++--
 server/dcc-encoders.h    |  2 --
 server/display-channel.c |  2 +-
 server/display-channel.h |  2 --
 server/image-cache.c     |  2 +-
 server/image-cache.h     |  1 -
 server/inputs-channel.c  | 10 +++++++---
 server/inputs-channel.h  |  3 ---
 server/reds.c            |  9 ++++++---
 server/reds.h            |  5 -----
 10 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/server/dcc-encoders.c b/server/dcc-encoders.c
index e20a645..d4a0ec5 100644
--- a/server/dcc-encoders.c
+++ b/server/dcc-encoders.c
@@ -26,6 +26,9 @@
 
 #define ZLIB_DEFAULT_COMPRESSION_LEVEL 3
 
+static void dcc_free_glz_drawable_instance(DisplayChannelClient *dcc,
+                                           GlzDrawableInstanceItem *item);
+
 static SPICE_GNUC_NORETURN SPICE_GNUC_PRINTF(2, 3) void
 quic_usr_error(QuicUsrContext *usr, const char *fmt, ...)
 {
@@ -452,8 +455,8 @@ void marshaller_add_compressed(SpiceMarshaller *m,
    it is not used by Drawable).
    NOTE - 1) can be called only by the display channel that created the drawable
           2) it is assumed that the instance was already removed from the dictionary*/
-void dcc_free_glz_drawable_instance(DisplayChannelClient *dcc,
-                                    GlzDrawableInstanceItem *instance)
+static void dcc_free_glz_drawable_instance(DisplayChannelClient *dcc,
+                                           GlzDrawableInstanceItem *instance)
 {
     DisplayChannel *display_channel = DCC_TO_DC(dcc);
     RedGlzDrawable *glz_drawable;
diff --git a/server/dcc-encoders.h b/server/dcc-encoders.h
index 84f9f93..b66fb1e 100644
--- a/server/dcc-encoders.h
+++ b/server/dcc-encoders.h
@@ -38,8 +38,6 @@ typedef struct RedGlzDrawable RedGlzDrawable;
 
 void             dcc_encoders_init                           (DisplayChannelClient *dcc);
 void             dcc_encoders_free                           (DisplayChannelClient *dcc);
-void             dcc_free_glz_drawable_instance              (DisplayChannelClient *dcc,
-                                                              GlzDrawableInstanceItem *item);
 void             dcc_free_glz_drawable                       (DisplayChannelClient *dcc,
                                                               RedGlzDrawable *drawable);
 int              dcc_free_some_independent_glz_drawables     (DisplayChannelClient *dcc);
diff --git a/server/display-channel.c b/server/display-channel.c
index 13be947..cecc604 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -1770,7 +1770,7 @@ static void clear_surface_drawables_from_pipes(DisplayChannel *display, int surf
 }
 
 /* TODO: cleanup/refactor destroy functions */
-void display_channel_destroy_surface(DisplayChannel *display, uint32_t surface_id)
+static void display_channel_destroy_surface(DisplayChannel *display, uint32_t surface_id)
 {
     draw_depend_on_me(display, surface_id);
     /* note that draw_depend_on_me must be called before current_remove_all.
diff --git a/server/display-channel.h b/server/display-channel.h
index 8aaab9f..16ea709 100644
--- a/server/display-channel.h
+++ b/server/display-channel.h
@@ -282,8 +282,6 @@ void                       display_channel_free_glz_drawables        (DisplayCha
 void                       display_channel_destroy_surface_wait      (DisplayChannel *display,
                                                                       uint32_t surface_id);
 void                       display_channel_destroy_surfaces          (DisplayChannel *display);
-void                       display_channel_destroy_surface           (DisplayChannel *display,
-                                                                      uint32_t surface_id);
 uint32_t                   display_channel_generate_uid              (DisplayChannel *display);
 void                       display_channel_process_draw              (DisplayChannel *display,
                                                                       RedDrawable *red_drawable,
diff --git a/server/image-cache.c b/server/image-cache.c
index ab10880..5e6a59f 100644
--- a/server/image-cache.c
+++ b/server/image-cache.c
@@ -35,7 +35,7 @@ static ImageCacheItem *image_cache_find(ImageCache *cache, uint64_t id)
     return NULL;
 }
 
-int image_cache_hit(ImageCache *cache, uint64_t id)
+static int image_cache_hit(ImageCache *cache, uint64_t id)
 {
     ImageCacheItem *item;
     if (!(item = image_cache_find(cache, id))) {
diff --git a/server/image-cache.h b/server/image-cache.h
index 38a318e..b90a3b3 100644
--- a/server/image-cache.h
+++ b/server/image-cache.h
@@ -50,7 +50,6 @@ typedef struct ImageCache {
 #endif
 } ImageCache;
 
-int          image_cache_hit               (ImageCache *cache, uint64_t id);
 void         image_cache_init              (ImageCache *cache);
 void         image_cache_reset             (ImageCache *cache);
 void         image_cache_aging             (ImageCache *cache);
diff --git a/server/inputs-channel.c b/server/inputs-channel.c
index bdb8d6f..d2ce290 100644
--- a/server/inputs-channel.c
+++ b/server/inputs-channel.c
@@ -65,6 +65,10 @@ struct SpiceKbdState {
     RedsState *reds;
 };
 
+static SpiceKbdInstance* inputs_channel_get_keyboard(InputsChannel *inputs);
+static SpiceMouseInstance* inputs_channel_get_mouse(InputsChannel *inputs);
+static SpiceTabletInstance* inputs_channel_get_tablet(InputsChannel *inputs);
+
 static SpiceKbdState* spice_kbd_state_new(RedsState *reds)
 {
     SpiceKbdState *st = spice_new0(SpiceKbdState, 1);
@@ -605,7 +609,7 @@ InputsChannel* inputs_channel_new(RedsState *reds)
     return inputs;
 }
 
-SpiceKbdInstance* inputs_channel_get_keyboard(InputsChannel *inputs)
+static SpiceKbdInstance* inputs_channel_get_keyboard(InputsChannel *inputs)
 {
     return inputs->keyboard;
 }
@@ -621,7 +625,7 @@ int inputs_channel_set_keyboard(InputsChannel *inputs, SpiceKbdInstance *keyboar
     return 0;
 }
 
-SpiceMouseInstance* inputs_channel_get_mouse(InputsChannel *inputs)
+static SpiceMouseInstance* inputs_channel_get_mouse(InputsChannel *inputs)
 {
     return inputs->mouse;
 }
@@ -637,7 +641,7 @@ int inputs_channel_set_mouse(InputsChannel *inputs, SpiceMouseInstance *mouse)
     return 0;
 }
 
-SpiceTabletInstance* inputs_channel_get_tablet(InputsChannel *inputs)
+static SpiceTabletInstance* inputs_channel_get_tablet(InputsChannel *inputs)
 {
     return inputs->tablet;
 }
diff --git a/server/inputs-channel.h b/server/inputs-channel.h
index 5b12fad..8a6211b 100644
--- a/server/inputs-channel.h
+++ b/server/inputs-channel.h
@@ -33,11 +33,8 @@ const VDAgentMouseState *inputs_channel_get_mouse_state(InputsChannel *inputs);
 void inputs_channel_on_keyboard_leds_change(InputsChannel *inputs, uint8_t leds);
 void inputs_channel_set_tablet_logical_size(InputsChannel *inputs, int x_res, int y_res);
 
-SpiceKbdInstance* inputs_channel_get_keyboard(InputsChannel *inputs);
 int inputs_channel_set_keyboard(InputsChannel *inputs, SpiceKbdInstance *keyboard);
-SpiceMouseInstance* inputs_channel_get_mouse(InputsChannel *inputs);
 int inputs_channel_set_mouse(InputsChannel *inputs, SpiceMouseInstance *mouse);
-SpiceTabletInstance* inputs_channel_get_tablet(InputsChannel *inputs);
 int inputs_channel_set_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet, RedsState *reds);
 int inputs_channel_has_tablet(InputsChannel *inputs);
 void inputs_channel_detach_tablet(InputsChannel *inputs, SpiceTabletInstance *tablet);
diff --git a/server/reds.c b/server/reds.c
index 5c0f9b6..74deb58 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -72,6 +72,9 @@
 
 #include "reds-private.h"
 
+static void reds_client_monitors_config(RedsState *reds, VDAgentMonitorsConfig *monitors_config);
+static gboolean reds_use_client_monitors_config(RedsState *reds);
+
 static SpiceCoreInterface *core_public = NULL;
 
 static SpiceTimer *adapter_timer_add(const SpiceCoreInterfaceInternal *iface, SpiceTimerFunc func, void *opaque)
@@ -1848,7 +1851,7 @@ static void reds_handle_main_link(RedsState *reds, RedLinkInfo *link)
      ((state & SPICE_MOUSE_BUTTON_MASK_MIDDLE) ? VD_AGENT_MBUTTON_MASK : 0) |    \
      ((state & SPICE_MOUSE_BUTTON_MASK_RIGHT) ? VD_AGENT_RBUTTON_MASK : 0))
 
-void reds_set_client_mouse_allowed(RedsState *reds, int is_client_mouse_allowed, int x_res, int y_res)
+static void reds_set_client_mouse_allowed(RedsState *reds, int is_client_mouse_allowed, int x_res, int y_res)
 {
     reds->monitor_mode.x_res = x_res;
     reds->monitor_mode.y_res = y_res;
@@ -4209,7 +4212,7 @@ void reds_update_client_mouse_allowed(RedsState *reds)
     }
 }
 
-gboolean reds_use_client_monitors_config(RedsState *reds)
+static gboolean reds_use_client_monitors_config(RedsState *reds)
 {
     GList *l;
 
@@ -4226,7 +4229,7 @@ gboolean reds_use_client_monitors_config(RedsState *reds)
     return TRUE;
 }
 
-void reds_client_monitors_config(RedsState *reds, VDAgentMonitorsConfig *monitors_config)
+static void reds_client_monitors_config(RedsState *reds, VDAgentMonitorsConfig *monitors_config)
 {
     GList *l;
 
diff --git a/server/reds.h b/server/reds.h
index ec1ea59..1f05081 100644
--- a/server/reds.h
+++ b/server/reds.h
@@ -45,9 +45,6 @@ void reds_handle_channel_event(RedsState *reds, int event, SpiceChannelEventInfo
 void reds_disable_mm_time(RedsState *reds);
 void reds_enable_mm_time(RedsState *reds);
 uint32_t reds_get_mm_time(void);
-void reds_set_client_mouse_allowed(RedsState *reds,
-                                   int is_client_mouse_allowed,
-                                   int x_res, int y_res);
 void reds_register_channel(RedsState *reds, RedChannel *channel);
 void reds_unregister_channel(RedsState *reds, RedChannel *channel);
 int reds_get_mouse_mode(RedsState *reds); // used by inputs_channel
@@ -100,8 +97,6 @@ spice_wan_compression_t reds_get_jpeg_state(const RedsState *reds);
 spice_wan_compression_t reds_get_zlib_glz_state(const RedsState *reds);
 SpiceCoreInterfaceInternal* reds_get_core_interface(RedsState *reds);
 void reds_update_client_mouse_allowed(RedsState *reds);
-gboolean reds_use_client_monitors_config(RedsState *reds);
-void reds_client_monitors_config(RedsState *reds, VDAgentMonitorsConfig *monitors_config);
 MainDispatcher* reds_get_main_dispatcher(RedsState *reds);
 
 /* fd watches/timers */
-- 
2.7.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]