From 3b4452d43e2683953f2f0520ad75e0102fe0b0da Mon Sep 17 00:00:00 2001 From: Roman Arutyunyan Date: Wed, 12 Jun 2013 20:37:24 +0400 Subject: [PATCH] added pragma warning to disable msvc warning about zero-sized arrays --- ngx_rtmp_mp4_module.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/ngx_rtmp_mp4_module.c b/ngx_rtmp_mp4_module.c index 393468a..0044c64 100644 --- a/ngx_rtmp_mp4_module.c +++ b/ngx_rtmp_mp4_module.c @@ -26,6 +26,14 @@ static ngx_int_t ngx_rtmp_mp4_reset(ngx_rtmp_session_t *s); #pragma pack(push,4) +/* disable zero-sized array warning by msvc */ + +#if (NGX_WIN32) +#pragma warning(push) +#pragma warning(disable:4200) +#endif + + typedef struct { uint32_t first_chunk; uint32_t samples_per_chunk; @@ -102,6 +110,12 @@ typedef struct { uint64_t entries[0]; } ngx_rtmp_mp4_offsets64_t; + +#if (NGX_WIN32) +#pragma warning(pop) +#endif + + #pragma pack(pop)