[rtems commit] memalign: Add missing attributes to fix warning

Sebastian Huber sebh at rtems.org
Thu Jan 10 10:35:52 UTC 2019


Module:    rtems
Branch:    master
Commit:    8eaf136de989bfaa2780895ce91ae42da631a734
Changeset: http://git.rtems.org/rtems/commit/?id=8eaf136de989bfaa2780895ce91ae42da631a734

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Jan 10 11:35:12 2019 +0100

memalign: Add missing attributes to fix warning

Update #3666.

---

 cpukit/libcsupport/src/alignedalloc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/cpukit/libcsupport/src/alignedalloc.c b/cpukit/libcsupport/src/alignedalloc.c
index 0ecf739..57fff48 100644
--- a/cpukit/libcsupport/src/alignedalloc.c
+++ b/cpukit/libcsupport/src/alignedalloc.c
@@ -38,4 +38,6 @@ void *aligned_alloc( size_t alignment, size_t size )
   return rtems_heap_allocate_aligned_with_boundary( size, alignment, 0 );
 }
 
-void *memalign( size_t, size_t ) RTEMS_ALIAS( aligned_alloc );
+void *memalign( size_t, size_t ) RTEMS_ALIAS( aligned_alloc ) __malloc_like
+  __alloc_align(1) __alloc_size(2) __result_use_check
+  __attribute__((__nothrow__));



More information about the vc mailing list