[riot-notifications] [RIOT-OS/RIOT] pkg/tlsf: Fix the way system functions are overriden. (#12031)

benpicco notifications at github.com
Thu Sep 12 22:43:07 CEST 2019

benpicco commented on this pull request.

> +#include "irq.h"
+#include "tlsf.h"
+#include "tlsf-malloc.h"
+#include "tlsf-malloc-internal.h"
+/* TODO: Add defines for other compilers */
+#if defined(__GNUC__) && !defined(__clang__)    /* Clang supports __GNUC__ but
+                                                 * not the alloc_size()
+                                                 * attribute */
+#define ATTR_MALLOC  __attribute__((malloc, alloc_size(1)))
+#define ATTR_CALLOC  __attribute__((malloc, alloc_size(1,2)))
+#define ATTR_MALIGN  __attribute__((alloc_align(1), alloc_size(2), malloc))
+#define ATTR_REALLOC  __attribute__((alloc_size(2)))
+#else /* No GNU C -> no alias attribute */

Shouldn't there be at least a warning then?

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190912/792b1a99/attachment.htm>

More information about the notifications mailing list