This is an automated email from the git hooks/post-receive script.
Git pushed a commit to branch master
in repository ffmpeg.
The following commit(s) were added to refs/heads/master by this push:
new fccb887903 avutil/mem: check attribute support for allocation
attributes
fccb887903 is described below
commit fccb887903fa799146ecf7500c3339f9c9b27e6e
Author: Kacper Michajłow <[email protected]>
AuthorDate: Sat Aug 22 19:05:52 2026 +0200
Commit: James Almer <[email protected]>
CommitDate: Wed Aug 26 20:13:06 2026 +0000
avutil/mem: check attribute support for allocation attributes
Clang reports itself as gcc 4.2, so av_alloc_size was never applied for
it, and neither attribute was applied for clang with MSVC target, which
does not define __GNUC__ at all. Check for the attributes directly.
Signed-off-by: Kacper Michajłow <[email protected]>
---
libavutil/mem.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavutil/mem.h b/libavutil/mem.h
index ab7648ac57..2b53661d3a 100644
--- a/libavutil/mem.h
+++ b/libavutil/mem.h
@@ -65,7 +65,7 @@
* @see <a
href="https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-g_t_0040code_007bmalloc_007d-function-attribute-3251">Function
attribute `malloc` in GCC's documentation</a>
*/
-#if AV_GCC_VERSION_AT_LEAST(3,1)
+#if AV_GCC_VERSION_AT_LEAST(3,1) || AV_HAS_ATTRIBUTE(__malloc__)
#define av_malloc_attrib __attribute__((__malloc__))
#else
#define av_malloc_attrib
@@ -86,7 +86,7 @@
* @see <a
href="https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#index-g_t_0040code_007balloc_005fsize_007d-function-attribute-3220">Function
attribute `alloc_size` in GCC's documentation</a>
*/
-#if AV_GCC_VERSION_AT_LEAST(4,3)
+#if AV_GCC_VERSION_AT_LEAST(4,3) || AV_HAS_ATTRIBUTE(alloc_size)
#define av_alloc_size(...) __attribute__((alloc_size(__VA_ARGS__)))
#else
#define av_alloc_size(...)
--
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]