Applied, thanks!

[email protected], le sam. 04 oct. 2025 20:40:31 +0100, a ecrit:
> From: Diego Nieto Cid <[email protected]>
> 
>     ../../ftpfs/ftpfs.c: In function 'netfs_append_args':
>     ../../ftpfs/ftpfs.c:352:11: warning: ignoring return value of 'asprintf' 
> declared with attribute 'warn_unused_result' [-Wunused-result]
> ---
>  ftpfs/ftpfs.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/ftpfs/ftpfs.c b/ftpfs/ftpfs.c
> index ba77caed..9a360126 100644
> --- a/ftpfs/ftpfs.c
> +++ b/ftpfs/ftpfs.c
> @@ -349,9 +349,14 @@ netfs_append_args (char **argz, size_t *argz_len)
>        if (debug_stream != stderr)
>       {
>         char *rep;
> -       asprintf (&rep, "--debug=%s", debug_stream_name);
> -       err = argz_add (argz, argz_len, rep);
> -       free (rep);
> +       err = asprintf (&rep, "--debug=%s", debug_stream_name);
> +       if (err != -1)
> +         {
> +           err = argz_add (argz, argz_len, rep);
> +           free (rep);
> +         }
> +       else
> +         err = ENOMEM;
>       }
>        else
>       err = argz_add (argz, argz_len, "--debug");
> -- 
> 2.51.0
> 
> 

-- 
Samuel
<P> je sens venir la fonte 14 pour le rapport
 -+- #ens-mim -+-

Reply via email to