Re: [PATCH v2] Constify spice_server_char_device_recognized_subtypes

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

 



Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>


On Fri, 2016-06-24 at 07:41 +0100, Frediano Ziglio wrote:
> Users should not change the list of supported subtypes.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  configure.ac        | 1 +
>  server/reds.c       | 4 ++--
>  server/spice-char.h | 1 +
>  3 files changed, 4 insertions(+), 2 deletions(-)
> 
> Changes from v1:
> - do not break API;
> - add some comments on API breakage updates.
> 
> diff --git a/configure.ac b/configure.ac
> index 375d26e..4923b40 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -11,6 +11,7 @@ AC_PREREQ([2.57])
>  # - If any interfaces have been removed or changed since the last public
> release,
>  #   then set age to 0.
>  #
> +dnl TODO see server/spice-char.h TODO comment for API breakage
>  m4_define([SPICE_CURRENT], [12])
>  m4_define([SPICE_REVISION], [0])
>  m4_define([SPICE_AGE], [11])
> diff --git a/server/reds.c b/server/reds.c
> index fdf62e5..56138e1 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -3161,7 +3161,7 @@ SPICE_GNUC_VISIBLE void
> spice_server_char_device_wakeup(SpiceCharDeviceInstance*
>  #define SUBTYPE_USBREDIR "usbredir"
>  #define SUBTYPE_PORT "port"
>  
> -static const char *spice_server_char_device_recognized_subtypes_list[] = {
> +static const char *const spice_server_char_device_recognized_subtypes_list[]
> = {
>      SUBTYPE_VDAGENT,
>  #ifdef USE_SMARTCARD
>      SUBTYPE_SMARTCARD,
> @@ -3172,7 +3172,7 @@ static const char
> *spice_server_char_device_recognized_subtypes_list[] = {
>  
>  SPICE_GNUC_VISIBLE const char**
> spice_server_char_device_recognized_subtypes(void)
>  {
> -    return spice_server_char_device_recognized_subtypes_list;
> +    return (const char **) spice_server_char_device_recognized_subtypes_list;
>  }
>  
>  static void reds_add_char_device(RedsState *reds, RedCharDevice *dev)
> diff --git a/server/spice-char.h b/server/spice-char.h
> index efd685d..1a8a031 100644
> --- a/server/spice-char.h
> +++ b/server/spice-char.h
> @@ -56,6 +56,7 @@ struct SpiceCharDeviceInstance {
>  
>  void spice_server_char_device_wakeup(SpiceCharDeviceInstance *sin);
>  void spice_server_port_event(SpiceCharDeviceInstance *char_device, uint8_t
> event);
> +/* TODO change return to const char *const * when API break */
>  const char** spice_server_char_device_recognized_subtypes(void);
>  
>  #endif /* SPICE_CHAR_H_ */
_______________________________________________
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]