[Spice-devel] [PATCH vdagent 2/2] vdagentd: Fix building warning

Christophe Fergeau cfergeau at redhat.com
Sun Dec 9 23:45:26 PST 2012


This one looks good, ACK.

Christophe

On Wed, Dec 05, 2012 at 04:01:59PM +0800, Dunrong Huang wrote:
> Move some variable declarations to right place.
> 
> Signed-off-by: Dunrong Huang <riegamaths at gmail.com>
> ---
>  src/vdagentd.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/src/vdagentd.c b/src/vdagentd.c
> index 7006d80..a51ac4c 100644
> --- a/src/vdagentd.c
> +++ b/src/vdagentd.c
> @@ -510,10 +510,9 @@ void release_clipboards(void)
>  
>  void update_active_session_connection(void)
>  {
> -    struct udscs_connection *new_conn = NULL;
> -    int n;
> -
>  #ifdef HAVE_SESSION_INFO
> +    int n;
> +    struct udscs_connection *new_conn = NULL;
>      if (!active_session)
>          active_session = session_info_get_active_session(session_info);
>  
> @@ -541,7 +540,9 @@ void update_active_session_connection(void)
>  
>  void agent_connect(struct udscs_connection *conn)
>  {
> +#ifdef HAVE_SESSION_INFO
>      uint32_t pid;
> +#endif
>      struct agent_data *agent_data;
>  
>      agent_data = calloc(1, sizeof(*agent_data));
> @@ -707,7 +708,10 @@ void daemonize(void)
>  void main_loop(void)
>  {
>      fd_set readfds, writefds;
> -    int n, nfds, ck_fd = 0;
> +    int n, nfds;
> +#ifdef HAVE_SESSION_INFO
> +    int ck_fd = 0;
> +#endif
>  
>      while (!quit) {
>          FD_ZERO(&readfds);
> -- 
> 1.8.0
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20121210/033f04b2/attachment.pgp>


More information about the Spice-devel mailing list