Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@pefoley.com>2016-03-21 20:15:42 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-03-21 22:27:16 +0300
commit3ba2c39fb2a12cd7332ef16b1b3e3df994f7c6f5 (patch)
tree33987013a31f23640eb0c4b464347ea12d0dc36b /winsup/cygwin/malloc_wrapper.cc
parent6699e21ffb4f0beeeec6a5d26cfd5684c26ecb42 (diff)
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 <pefoley2@pefoley.com>
Diffstat (limited to 'winsup/cygwin/malloc_wrapper.cc')
-rw-r--r--winsup/cygwin/malloc_wrapper.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/winsup/cygwin/malloc_wrapper.cc b/winsup/cygwin/malloc_wrapper.cc
index 43b8144b2..0db5de839 100644
--- a/winsup/cygwin/malloc_wrapper.cc
+++ b/winsup/cygwin/malloc_wrapper.cc
@@ -126,8 +126,7 @@ posix_memalign (void **memptr, size_t alignment, size_t bytes)
__malloc_unlock ();
if (!res)
return ENOMEM;
- if (memptr)
- *memptr = res;
+ *memptr = res;
return 0;
}