From 58f8347e84d2820cada64c513bb0f2b81ecd494a Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 10 Jul 2016 16:00:34 +0200 Subject: Fix new GCC warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- doc/info/mds.texinfo | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc') diff --git a/doc/info/mds.texinfo b/doc/info/mds.texinfo index 92ed37b..d094ecf 100644 --- a/doc/info/mds.texinfo +++ b/doc/info/mds.texinfo @@ -6454,6 +6454,16 @@ duplicate is stored in the variable @code{var}. If @code{original} is @code{NULL}, @code{var} is set to @code{NULL} and zero is returned. +@item @code{xstrdup_nn} [(@code{char* var, const char* original}) @arrow{} @code{int}] +@fnindex @code{xstrdup} +@cpindex Memory management +Wrapper for @code{strdup} that returns zero on and +only on success. @code{original} is duplicate and the +duplicate is stored in the variable @code{var}. +@code{original} must not be @code{NULL}. This macro +was added because GCC 6.1.1 warns if @code{xstrdup} +is used and @code{original} is known not to be @code{NULL}. + @item @code{xmemdup} [(@code{void* var, const void* original, size_t elements, type}) @arrow{} @code{int}] @fnindex @code{xmemdup} @cpindex Memory management -- cgit v1.2.3-70-g09d2