fix: src\pool.c(33): warning C4200: nonstandard extension used: zero-sized array in struct/union

This commit is contained in:
Tomasz Dąbrowski
2017-09-25 17:12:15 +02:00
committed by Tomasz Dabrowski
parent f0c1074b07
commit 220c628210
+11
View File
@@ -25,6 +25,13 @@
#endif
/* end of configuration section */
/* Disable MSVC warning "C4200: nonstandard extension used: zero-sized array
* in struct/union" when in C++ mode */
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4200)
#endif
struct mrb_pool_page {
struct mrb_pool_page *next;
size_t offset;
@@ -33,6 +40,10 @@ struct mrb_pool_page {
char page[];
};
#ifdef _MSC_VER
#pragma warning(pop)
#endif
struct mrb_pool {
mrb_state *mrb;
struct mrb_pool_page *pages;