[Spice-devel] [PATCH spice-server 00/15] Remove unused functions

Frediano Ziglio fziglio at redhat.com
Fri Nov 20 01:32:56 PST 2015


> 
> Hi,
> 
> I noticed that there are some unused functions in our code.
> Some of them were just defined, but haven't been used, others
> stopped being used because some other functions were changed/removed.
> I'm not sure about last 3-4 patches - if _create() is called then
> it would make sense to call _destroy() too - I will investigate more.
> 
> Thanks,
> Pavel
> 

Hi Pavel,
   please do not remove any *_destroy or cleanup (like stat_remove_*)
function. I'll have a branch that will allow to cleanup everything.
Is useful (I used and uses sometimes) to detect leaks and I would like
to implement some lazy allocation to reduce memory footprint when clients
are not connected so I need to free resources at some times.

Frediano

> Pavel Grunt (15):
>   tree: Remove unused tree_item_dump
>   dispatcher: Remove unused dispatcher_read_message
>   red dispatcher: Remove unused declaration of
>     red_dispatcher_set_mm_time
>   red channel: Remove unused red_channel_test_remote_common_cap
>   red channel: Remove unused red_channel_pipes_new_add_tail
>   red channel: Remove unused red_channel_client_pipe_item_is_linked
>   red channel: Remove unused red_channel_push_set_ack
>   red channel: Remove unused declaration of red_channel_pipes_remove
>   red channel: Remove unused red_channel_apply_clients_data
>   main channel: Remove unused main_channel_push_notify
>   main channel: Remove unused main_channel_client_get_link_id
>   stat: Remove unused stat_remove_*
>   timer queue: Remove unused spice_timer_queue_destroy
>   jpeg encoder: Remove unused jpeg_encoder_destroy
>   lz4 encoder: Removed unused lz4_encoder_destroy
> 
>  server/dispatcher.c        | 13 -------------
>  server/dispatcher.h        |  1 -
>  server/jpeg_encoder.c      |  6 ------
>  server/jpeg_encoder.h      |  1 -
>  server/lz4_encoder.c       |  5 -----
>  server/lz4_encoder.h       |  1 -
>  server/main_channel.c      | 11 -----------
>  server/main_channel.h      |  2 --
>  server/red_channel.c       | 43 -------------------------------------------
>  server/red_channel.h       |  7 -------
>  server/red_dispatcher.h    |  1 -
>  server/reds.c              | 19 -------------------
>  server/spice_timer_queue.c | 24 ------------------------
>  server/spice_timer_queue.h |  1 -
>  server/stat.h              |  4 ----
>  server/tree.c              |  8 --------
>  server/tree.h              |  1 -
>  17 files changed, 148 deletions(-)
> 


More information about the Spice-devel mailing list