[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50167: fixes for "fmt - -" etc.
From: |
Bernhard Voelker |
Subject: |
bug#50167: fixes for "fmt - -" etc. |
Date: |
Tue, 24 Aug 2021 21:42:30 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 |
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
Description: Text Data