The branch, master has been updated
       via  3a8ea78b88d14ac2a3d6dddbf22a3f00ba1ee8d4 (commit)
      from  9034ca30effd6ba00977bbcbe61e7e4852e4ef2e (commit)


- Log -----------------------------------------------------------------
commit 3a8ea78b88d14ac2a3d6dddbf22a3f00ba1ee8d4
Author:     Kacper Michajłow <[email protected]>
AuthorDate: Thu Oct 9 06:22:39 2025 +0200
Commit:     Kacper Michajłow <[email protected]>
CommitDate: Thu Oct 9 06:25:06 2025 +0200

    avutil/attributes: add AV_HAS_ATTRIBUTE
    
    Maybe useful and to fix MSVC preprocessor warnings.
    
    Fixes: afad332d77278232662e6d8c95c2fc80cb44c8dd
    Signed-off-by: Kacper Michajłow <[email protected]>

diff --git a/libavutil/attributes.h b/libavutil/attributes.h
index 2bdf5ed4e4..9e0222a691 100644
--- a/libavutil/attributes.h
+++ b/libavutil/attributes.h
@@ -40,6 +40,12 @@
 #    define AV_HAS_BUILTIN(x) 0
 #endif
 
+#ifdef __has_attribute
+#    define AV_HAS_ATTRIBUTE(x) __has_attribute(x)
+#else
+#    define AV_HAS_ATTRIBUTE(x) 0
+#endif
+
 #if defined(__cplusplus) && defined(__has_cpp_attribute)
 #    define AV_HAS_STD_ATTRIBUTE(x) __has_cpp_attribute(x)
 #elif !defined(__cplusplus) && defined(__has_c_attribute)
@@ -183,13 +189,13 @@
 
 #ifdef __MINGW_PRINTF_FORMAT
 #    define AV_PRINTF_FMT __MINGW_PRINTF_FORMAT
-#elif defined(__has_attribute) && __has_attribute(format)
+#elif AV_HAS_ATTRIBUTE(format)
 #    define AV_PRINTF_FMT __printf__
 #endif
 
 #ifdef __MINGW_SCANF_FORMAT
 #    define AV_SCANF_FMT __MINGW_SCANF_FORMAT
-#elif defined(__has_attribute) && __has_attribute(format)
+#elif AV_HAS_ATTRIBUTE(format)
 #    define AV_SCANF_FMT __scanf__
 #endif
 

-----------------------------------------------------------------------

Summary of changes:
 libavutil/attributes.h | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)


hooks/post-receive
-- 

_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to