Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH] avcodec/ccaption_dec: Use static_assert instead of _Static_assert
@ 2024-03-15 11:46 Andreas Rheinhardt
  2024-03-17 14:46 ` Andreas Rheinhardt
  0 siblings, 1 reply; 2+ messages in thread
From: Andreas Rheinhardt @ 2024-03-15 11:46 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: Andreas Rheinhardt

The latter is not supported by MSVC 19.27.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/ccaption_dec.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c
index faf058ce97..d8b992bb94 100644
--- a/libavcodec/ccaption_dec.c
+++ b/libavcodec/ccaption_dec.c
@@ -19,6 +19,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include <assert.h>
 #include "avcodec.h"
 #include "ass.h"
 #include "codec_internal.h"
@@ -180,9 +181,9 @@ static const char charset_overrides[4][128][sizeof("\u266a")] =
 };
 #define EMPTY_START(IDX)
 #define EMPTY_END
-#define ASSERT_ENTRY(IDX, str)                                     \
-    _Static_assert(sizeof(str) <= sizeof(charset_overrides[0][0]), \
-                   "'" str "' string takes too much space");
+#define ASSERT_ENTRY(IDX, str)                                    \
+    static_assert(sizeof(str) <= sizeof(charset_overrides[0][0]), \
+                  "'" str "' string takes too much space");
 CHARSET_OVERRIDE_LIST(EMPTY_START, ASSERT_ENTRY, EMPTY_END)
 
 static const unsigned char bg_attribs[8] = // Color
-- 
2.40.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-17 14:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-15 11:46 [FFmpeg-devel] [PATCH] avcodec/ccaption_dec: Use static_assert instead of _Static_assert Andreas Rheinhardt
2024-03-17 14:46 ` Andreas Rheinhardt

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git