From d54063bfd53384bd02e2786ca62ad735069c490b Mon Sep 17 00:00:00 2001 From: Branimir Karadzic Date: Mon, 17 Nov 2014 08:33:14 -0800 Subject: [PATCH] Fixed GCC/Clang warnings. --- examples/20-nanovg/nanovg.cpp | 2 +- examples/common/nanovg/nanovg.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/20-nanovg/nanovg.cpp b/examples/20-nanovg/nanovg.cpp index 05cedc612..fe99a117f 100644 --- a/examples/20-nanovg/nanovg.cpp +++ b/examples/20-nanovg/nanovg.cpp @@ -33,7 +33,7 @@ #include "nanovg/nanovg.h" BX_PRAGMA_DIAGNOSTIC_PUSH(); -BX_PRAGMA_DIAGNOSTIC_IGNORED_GCC("-Wunused-parameter"); +BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-parameter"); #define BLENDISH_IMPLEMENTATION #include "blendish.h" BX_PRAGMA_DIAGNOSTIC_POP(); diff --git a/examples/common/nanovg/nanovg.cpp b/examples/common/nanovg/nanovg.cpp index edb0837b0..1cbb58b57 100644 --- a/examples/common/nanovg/nanovg.cpp +++ b/examples/common/nanovg/nanovg.cpp @@ -22,13 +22,14 @@ #include -BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4505) // error C4505: '' : unreferenced local function has been removed BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4701) // error C4701: potentially uninitialized local variable 'cint' used -// MSVC doesn't like 4505 wrapped with warning disable push/pop. +// -Wunused-function and 4505 must be file scope, can't be disabled between push/pop. +BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-function"); +BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4505) // error C4505: '' : unreferenced local function has been removed BX_PRAGMA_DIAGNOSTIC_PUSH(); -BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-function"); BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wunused-parameter"); +BX_PRAGMA_DIAGNOSTIC_IGNORED_GCC("-Wunused-result"); #define FONTSTASH_IMPLEMENTATION #include "fontstash.h" BX_PRAGMA_DIAGNOSTIC_POP();