]> Savannah Git Hosting - gnulib.git/commit
string: Fix "mismatched allocation function" warnings regarding strndup.
authorBruno Haible <bruno@clisp.org>
Thu, 10 Feb 2022 01:44:14 +0000 (02:44 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 10 Feb 2022 01:44:14 +0000 (02:44 +0100)
commitcbdb5ea63cb5348d9ead16dc46bedda77a4c3d7d
tree4f44fe65902ddce3a17c605c55528f46c0808dfc
parentc5e68c675bea21eaa69d27e008a6480b3fcbc540
string: Fix "mismatched allocation function" warnings regarding strndup.

* lib/string.in.h (strndup): Mark with _GL_ATTRIBUTE_MALLOC and
_GL_ATTRIBUTE_DEALLOC_FREE. For GCC >= 11: Declare also when the
platform already declares the function or when the module 'strndup' is
not in use.
ChangeLog
lib/string.in.h