From 7a33e14ce92c006199d3f6dc76c1afdcfcae30b4 Mon Sep 17 00:00:00 2001 From: cloudwalk Date: Mon, 29 Jun 2020 03:21:07 +0000 Subject: [PATCH] Add -Wc++-compat flag and fix its sole warning. This *should* be safe. Famous last words... git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12752 d7cf8633-e32d-0410-b094-e92efae38249 --- image_png.c | 6 +----- makefile | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/image_png.c b/image_png.c index da327de2..7ef74f9a 100644 --- a/image_png.c +++ b/image_png.c @@ -511,7 +511,6 @@ qboolean PNG_SaveImage_preflipped (const char *filename, int width, int height, // NOTE: this relies on jmp_buf being the first thing in the png structure // created by libpng! (this is correct for libpng 1.2.x) -#ifdef __cplusplus #ifdef WIN64 if (setjmp((_JBTYPE *)png)) #elif defined(MACOSX) || defined(WIN32) @@ -519,10 +518,7 @@ qboolean PNG_SaveImage_preflipped (const char *filename, int width, int height, #elif defined(__ANDROID__) if (setjmp((long *)png)) #else - if (setjmp((__jmp_buf_tag *)png)) -#endif -#else - if (setjmp(png)) + if (setjmp((struct __jmp_buf_tag *)png)) #endif { qpng_destroy_write_struct(&png, &pnginfo); diff --git a/makefile b/makefile index 4fb547a0..38550197 100644 --- a/makefile +++ b/makefile @@ -217,7 +217,7 @@ ifeq ($(WIN64RELEASE), 1) # WINDRES=$(TARGET)-windres endif -CFLAGS_WARNINGS=-Wall -Wshadow -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement -Wmissing-prototypes +CFLAGS_WARNINGS=-Wall -Werror=c++-compat -Wshadow -Wold-style-definition -Wstrict-prototypes -Wsign-compare -Wdeclaration-after-statement -Wmissing-prototypes ifeq ($(DP_MAKE_TARGET), mingw) -- 2.39.2