From 3ba2c39fb2a12cd7332ef16b1b3e3df994f7c6f5 Mon Sep 17 00:00:00 2001 From: Peter Foley Date: Mon, 21 Mar 2016 13:15:42 -0400 Subject: Add nonnull annotation to posix_memalign. GCC 6.0+ asserts that the memptr argument to the builtin function posix_memalign is nonnull. Add the necessary annotation to the prototype and remove the now unnecessary check to fix a warning. newlib/Changelog newlib/libc/include/stdlib.h: Annotate arg to posix_memalign as non-null. winsup/cygwin/ChangeLog malloc_wrapper.cc (posix_memalign): Remove always true nonnull check. Signed-off-by: Peter Foley --- newlib/libc/include/stdlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'newlib/libc') diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h index f4b262698..7d4ae76f4 100644 --- a/newlib/libc/include/stdlib.h +++ b/newlib/libc/include/stdlib.h @@ -253,7 +253,7 @@ int _EXFUN(_unsetenv_r,(struct _reent *, const char *__string)); #ifdef __rtems__ #if __POSIX_VISIBLE >= 200112 -int _EXFUN(posix_memalign,(void **, size_t, size_t)); +int _EXFUN(__nonnull (1) posix_memalign,(void **, size_t, size_t)); #endif #endif -- cgit v1.2.3