From fc97584c696ac4b7ab988b978f9fa5798ad21a5d Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 3 Apr 2014 16:50:20 -0500 Subject: [PATCH] Disable warning C4200 on VC++ - This warning is about using zero-sized arrays in structs (aka flexible member arrays). It's standard-enough for our purposes, so don't warn about it, since neither GCC nor Clang do. --- src/doomtype.h | 4 ++++ src/textures/textures.h | 2 -- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/doomtype.h b/src/doomtype.h index 31f96d2ab..d201ca71d 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -34,6 +34,10 @@ // source files, so we can't use it. So define PATH_MAX to be what MAX_PATH // currently is: #define PATH_MAX 260 + +// Disable warning about using unsized arrays in structs. It supports it just +// fine, and so do Clang and GCC, but the latter two don't warn about it. +#pragma warning(disable:4200) #endif #include diff --git a/src/textures/textures.h b/src/textures/textures.h index da5f559ae..2992d8a46 100644 --- a/src/textures/textures.h +++ b/src/textures/textures.h @@ -107,8 +107,6 @@ struct FDoorAnimation FName CloseSound; }; - - // Patches. // A patch holds one or more columns. // Patches are used for sprites and all masked pictures, and we compose