second attempt at avoiding warnings at /W4 on vs2013shared-context
@@ -24,6 +24,12 @@ | |||||
#define STBI_HEADER_FILE_ONLY | #define STBI_HEADER_FILE_ONLY | ||||
#include "stb_image.c" | #include "stb_image.c" | ||||
#ifdef _MSC_VER | |||||
#pragma warning(disable: 4100) // unreferenced formal parameter | |||||
#pragma warning(disable: 4127) // conditional expression is constant | |||||
#pragma warning(disable: 4204) // nonstandard extension used : non-constant aggregate initializer | |||||
#pragma warning(disable: 4706) // assignment within conditional expression | |||||
#endif | |||||
#define NVG_INIT_COMMANDS_SIZE 256 | #define NVG_INIT_COMMANDS_SIZE 256 | ||||
#define NVG_INIT_POINTS_SIZE 128 | #define NVG_INIT_POINTS_SIZE 128 | ||||
@@ -980,7 +986,7 @@ static void nvg__addPoint(struct NVGcontext* ctx, float x, float y, int flags) | |||||
memset(pt, 0, sizeof(*pt)); | memset(pt, 0, sizeof(*pt)); | ||||
pt->x = x; | pt->x = x; | ||||
pt->y = y; | pt->y = y; | ||||
pt->flags = flags; | |||||
pt->flags = (unsigned char)flags; | |||||
ctx->cache->npoints++; | ctx->cache->npoints++; | ||||
path->count++; | path->count++; | ||||
@@ -25,6 +25,11 @@ extern "C" { | |||||
#define NVG_PI 3.14159265358979323846264338327f | #define NVG_PI 3.14159265358979323846264338327f | ||||
#ifdef _MSC_VER | |||||
#pragma warning(push) | |||||
#pragma warning(disable: 4201) // nonstandard extension used : nameless struct/union | |||||
#endif | |||||
struct NVGcontext; | struct NVGcontext; | ||||
struct NVGcolor { | struct NVGcolor { | ||||
@@ -584,6 +589,10 @@ struct NVGparams* nvgInternalParams(struct NVGcontext* ctx); | |||||
// Debug function to dump cached path data. | // Debug function to dump cached path data. | ||||
void nvgDebugDumpPathCache(struct NVGcontext* ctx); | void nvgDebugDumpPathCache(struct NVGcontext* ctx); | ||||
#ifdef _MSC_VER | |||||
#pragma warning(pop) | |||||
#endif | |||||
#define NVG_NOTUSED(v) for (;;) { (void)(1 ? (void)0 : ( (void)(v) ) ); break; } | #define NVG_NOTUSED(v) for (;;) { (void)(1 ? (void)0 : ( (void)(v) ) ); break; } | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||