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

Re: [Libguestfs] [PATCH libguestfs 2/9] fish.c: avoid warnings



On Fri, Aug 21, 2009 at 03:28:12PM +0200, Jim Meyering wrote:
> From: Jim Meyering <meyering redhat com>
> 
> * fish/rc.c (UNIX_PATH_MAX): Remove unused definition.
> * fish/fish.h (rc_listen): Declare with __attribute__((noreturn)).
> ---
>  fish/fish.h |    2 +-
>  fish/rc.c   |    2 --
>  2 files changed, 1 insertions(+), 3 deletions(-)
> 
> diff --git a/fish/fish.h b/fish/fish.h
> index a6cc8c9..b7ed922 100644
> --- a/fish/fish.h
> +++ b/fish/fish.h
> @@ -78,7 +78,7 @@ extern int do_glob (const char *cmd, int argc, char *argv[]);
>  extern int do_more (const char *cmd, int argc, char *argv[]);
> 
>  /* in rc.c (remote control) */
> -extern void rc_listen (void);
> +extern void rc_listen (void) __attribute__((noreturn));
>  extern int rc_remote (int pid, const char *cmd, int argc, char *argv[],
>                        int exit_on_error);
> 
> diff --git a/fish/rc.c b/fish/rc.c
> index 57f1c36..5423c22 100644
> --- a/fish/rc.c
> +++ b/fish/rc.c
> @@ -34,8 +34,6 @@
>  #include "fish.h"
>  #include "rc_protocol.h"
> 
> -#define UNIX_PATH_MAX 108
> -
>  static void
>  create_sockpath (pid_t pid, char *sockpath, int len, struct sockaddr_un *addr)
>  {
> -- 
> 1.6.4.378.g88f2f

UNIX_PATH_MAX unused .. by accident.

However the pathname we use is well under 108 characters so I'm
not worried.

ACK.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://et.redhat.com/~rjones/virt-top


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