svn commit: r302358 - head/include
Pedro F. Giffuni
pfg at FreeBSD.org
Tue Jul 5 22:30:31 UTC 2016
Author: pfg
Date: Tue Jul 5 22:30:29 2016
New Revision: 302358
URL: https://svnweb.freebsd.org/changeset/base/302358
Log:
Remove incorrect attributes from posix_memalign(3) declaration.
Both __alloc_align and __alloc_size can't be used when the function
returns a pointer to memory. This fixes breakage when building with
clang 3.4:
In file included from /usr/src/svn/usr.sbin/bhyve/atkbdc.c:40:
/usr/include/stdlib.h:176:6: error: '__alloc_size__' attribute only
applies to functions that return a pointer [-Werror,-Wignored-attributes]
Pointed out by: ngie, cem
Approved by: re (gjb)
Modified:
head/include/stdlib.h
Modified: head/include/stdlib.h
==============================================================================
--- head/include/stdlib.h Tue Jul 5 22:07:41 2016 (r302357)
+++ head/include/stdlib.h Tue Jul 5 22:30:29 2016 (r302358)
@@ -172,8 +172,7 @@ char *realpath(const char * __restrict,
int rand_r(unsigned *); /* (TSF) */
#endif
#if __POSIX_VISIBLE >= 200112
-int posix_memalign(void **, size_t, size_t) __nonnull(1) __alloc_align(2)
- __alloc_size(3); /* (ADV) */
+int posix_memalign(void **, size_t, size_t) __nonnull(1); /* (ADV) */
int setenv(const char *, const char *, int);
int unsetenv(const char *);
#endif
More information about the svn-src-all
mailing list