bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH 11/27] quotearg: improve -fanalyzer malloc checking


From: Bruno Haible
Subject: Re: [PATCH 11/27] quotearg: improve -fanalyzer malloc checking
Date: Sat, 07 Aug 2021 15:25:26 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-210-generic; KDE/5.18.0; x86_64; ; )

Paul Eggert wrote:
> @@ -342,7 +344,10 @@ char *quotearg_alloc (char const *arg, size_t argsize,
>     backslash escapes, and the flags of O do not request elision of
>     null bytes.*/
>  char *quotearg_alloc_mem (char const *arg, size_t argsize,
> -                          size_t *size, struct quoting_options const *o);
> +                          size_t *size, struct quoting_options const *o)
> +  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
> +  _GL_ATTRIBUTE_RETURNS_NONNULL;
> +;
>  
>  /* Use storage slot N to return a quoted version of the string ARG.
>     Use the default quoting options.
> 

This patch introduced a stray semicolon.


2021-08-07  Bruno Haible  <bruno@clisp.org>

        quotearg: Tweak last commit.
        * lib/quotearg.h: Don't include <stddef.h>. Remove stray semicolon.

diff --git a/lib/quotearg.h b/lib/quotearg.h
index 22c09bc..f5644b8 100644
--- a/lib/quotearg.h
+++ b/lib/quotearg.h
@@ -21,7 +21,6 @@
 #ifndef QUOTEARG_H_
 # define QUOTEARG_H_ 1
 
-# include <stddef.h>
 # include <stdlib.h>
 
 /* Basic quoting styles.  For each style, an example is given on the
@@ -279,6 +278,7 @@ struct quoting_options;
 struct quoting_options *clone_quoting_options (struct quoting_options *o)
   _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
   _GL_ATTRIBUTE_RETURNS_NONNULL;
+
 /* Get the value of O's quoting style.  If O is null, use the default.  */
 enum quoting_style get_quoting_style (struct quoting_options const *o);
 
@@ -347,7 +347,6 @@ char *quotearg_alloc_mem (char const *arg, size_t argsize,
                           size_t *size, struct quoting_options const *o)
   _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
   _GL_ATTRIBUTE_RETURNS_NONNULL;
-;
 
 /* Use storage slot N to return a quoted version of the string ARG.
    Use the default quoting options.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]