+2021-08-07 Bruno Haible <bruno@clisp.org>
+
+ [x]concat-filename: Improve GCC 11 allocation-deallocation checking.
+ * lib/concat-filename.h: Include <stdlib.h>.
+ (concatenated_filename, xconcatenated_filename): Declare that
+ deallocation must happen through 'free'.
+
2021-08-07 Bruno Haible <bruno@clisp.org>
clean-temp: Improve GCC 11 allocation-deallocation checking.
#ifndef _CONCAT_FILENAME_H
#define _CONCAT_FILENAME_H
+#include <stdlib.h>
+
#ifdef __cplusplus
extern "C" {
#endif
suffix. Return a freshly allocated filename. Return NULL and set errno
upon memory allocation failure. */
extern char *concatenated_filename (const char *directory,
- const char *filename, const char *suffix);
+ const char *filename, const char *suffix)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;
/* Concatenate a directory filename, a relative filename and an optional
suffix. Return a freshly allocated filename. */
extern char *xconcatenated_filename (const char *directory,
- const char *filename, const char *suffix);
+ const char *filename, const char *suffix)
+ _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+ _GL_ATTRIBUTE_RETURNS_NONNULL;
#ifdef __cplusplus