From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11509 invoked by alias); 23 Oct 2018 09:09:47 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 11454 invoked by uid 10080); 23 Oct 2018 09:09:47 -0000 Date: Tue, 23 Oct 2018 09:09:00 -0000 Message-ID: <20181023090947.11452.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] Fix posix_memalign() attributes X-Act-Checkin: newlib-cygwin X-Git-Author: Sebastian Huber X-Git-Refname: refs/heads/master X-Git-Oldrev: 5835688440fb0b23fe991a04c7e2df54ded87657 X-Git-Newrev: 08eab6396f678cf5e5968acaed0bae9fd129983b X-SW-Source: 2018-q4/txt/msg00020.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=08eab6396f678cf5e5968acaed0bae9fd129983b commit 08eab6396f678cf5e5968acaed0bae9fd129983b Author: Sebastian Huber Date: Mon Oct 22 11:23:15 2018 +0200 Fix posix_memalign() attributes The malloc, alloc_size and alloc_aligned attributes must be only used in case the function returns the pointer to the allocated memory. See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87683 Signed-off-by: Sebastian Huber Diff: --- newlib/libc/include/stdlib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h index 1972be7..9773d36 100644 --- a/newlib/libc/include/stdlib.h +++ b/newlib/libc/include/stdlib.h @@ -282,8 +282,8 @@ int _unsetenv_r (struct _reent *, const char *__string); #endif /* !__CYGWIN__ */ #if __POSIX_VISIBLE >= 200112 -int posix_memalign (void **, size_t, size_t) __malloc_like __nonnull((1)) - __alloc_align(2) __alloc_size(3) __result_use_check; +int posix_memalign (void **, size_t, size_t) __nonnull((1)) + __result_use_check; #endif char * _dtoa_r (struct _reent *, double, int, int, int *, int*, char**);