GNU bug report logs - #50167
fixes for "fmt - -" etc.

Previous Next

Package: coreutils;

Reported by: Paul Eggert <eggert <at> cs.ucla.edu>

Date: Sun, 22 Aug 2021 20:14:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 50167 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Paul Eggert <eggert <at> cs.ucla.edu>, 50167 <at> debbugs.gnu.org
Subject: Re: bug#50167: fixes for "fmt - -" etc.
Date: Tue, 24 Aug 2021 21:42:30 +0200
[Message part 1 (text/plain, inline)]
Hi Paul,

On 8/22/21 10:12 PM, Paul Eggert wrote:
> Subject: [PATCH 4/4] df: pacify -Wsuggest-attribute=malloc
>
> Problem found with latest Gnulib and GCC 11.2.1.
> * src/find-mount-point.h (find_mount_point):
> Add _GL_ATTRIBUTE_MALLOC and _GL_ATTRIBUTE_DEALLOC_FREE.
> ---
>  src/find-mount-point.h | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/find-mount-point.h b/src/find-mount-point.h
> index 028b2500c..a1bbcdc92 100644
> --- a/src/find-mount-point.h
> +++ b/src/find-mount-point.h
> @@ -14,4 +14,7 @@
>     You should have received a copy of the GNU General Public License
>     along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
>
> -extern char *find_mount_point (char const *, struct stat const *);
> +#include <stdlib.h>
> +
> +extern char *find_mount_point (char const *, struct stat const *)
> +  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;

`make syntax-check` complains:
  src/find-mount-point.h:17:#include <stdlib.h>
  maint.mk: the above are already included via system.h
  make: *** [cfg.mk:174: sc_system_h_headers] Error 1

The attached fixes it.
Was there a particular reason to include stdlib.h?

Have a nice day,
Berny
[0001-maint-avoid-sc_system_h_headers-error.patch (text/x-patch, attachment)]

This bug report was last modified 3 years and 321 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.