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

Re: [Libguestfs] [PATCH] fix fuse_opt_add_opt_escaped return type



On Tue, Sep 04, 2012 at 05:43:39PM +0200, Olaf Hering wrote:
> I: Program returns random data in a function
> E: libguestfs no-return-in-nonvoid-function guestmount.c:75
> 
> The function fuse_opt_add_opt_escaped has only one caller and a return
> code is not checked.
> 
> Signed-off-by: Olaf Hering <olaf aepfle de>
> ---
> 
> diff --git a/fuse/guestmount.c b/fuse/guestmount.c
> index 17e94ba..1eb0553 100644
> --- a/fuse/guestmount.c
> +++ b/fuse/guestmount.c
> @@ -49,7 +49,7 @@ static int write_pid_file (const char *pid_file, pid_t pid);
>   * Copyright (C) 2001-2007  Miklos Szeredi <miklos szeredi hu>
>   * This [function] can be distributed under the terms of the GNU LGPLv2.
>   */
> -static int
> +static void
>  fuse_opt_add_opt_escaped (char **opts, const char *opt)

Thanks - pushed.

I see what happened here:

(1) The upstream fuse_opt_add_opt_escaped function returns int.
However I rewrote this copy of the function so much that it no longer
returned anything.

(2) Because the function is not needed if you have recent fuse, we
weren't testing this so there were no gcc warnings.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
New in Fedora 11: Fedora Windows cross-compiler. Compile Windows
programs, test, and build Windows installers. Over 70 libraries supprt'd
http://fedoraproject.org/wiki/MinGW http://www.annexia.org/fedora_mingw


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