From 9cf809e666b9c03d77b2e57faa37ec306017d58a Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Mon, 9 May 2022 11:12:31 -0700 Subject: [PATCH] Backport from 6 to 3 Signed-off-by: Crola1702 --- ogre/include/ignition/rendering/ogre/OgreIncludes.hh | 2 ++ ogre/src/OgreRenderTarget.cc | 2 ++ ogre2/src/Ogre2RenderEngine.cc | 4 ++-- ogre2/src/Ogre2RenderTarget.cc | 7 +++++++ 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ogre/include/ignition/rendering/ogre/OgreIncludes.hh b/ogre/include/ignition/rendering/ogre/OgreIncludes.hh index b25eaaba8..66d504980 100644 --- a/ogre/include/ignition/rendering/ogre/OgreIncludes.hh +++ b/ogre/include/ignition/rendering/ogre/OgreIncludes.hh @@ -22,6 +22,8 @@ #pragma GCC system_header #else #pragma warning(push, 0) + #pragma warning(disable:4275) + #pragma warning(disable:4005) #endif // This prevents some deprecation #warning messages on OSX 10.9 diff --git a/ogre/src/OgreRenderTarget.cc b/ogre/src/OgreRenderTarget.cc index d1dbc2c97..c482fb6ac 100644 --- a/ogre/src/OgreRenderTarget.cc +++ b/ogre/src/OgreRenderTarget.cc @@ -20,6 +20,8 @@ # pragma GCC diagnostic ignored "-Wunused-parameter" #else # pragma warning(push, 0) +# pragma warning(disable: 4005) +# pragma warning(disable: 4275) #endif // leave this out of OgreIncludes as it conflicts with other files requiring // gl.h diff --git a/ogre2/src/Ogre2RenderEngine.cc b/ogre2/src/Ogre2RenderEngine.cc index e974210fb..970df9f74 100644 --- a/ogre2/src/Ogre2RenderEngine.cc +++ b/ogre2/src/Ogre2RenderEngine.cc @@ -123,7 +123,7 @@ void Ogre2RenderEngine::Destroy() delete this->ogreLogManager; this->ogreLogManager = nullptr; -#if not (__APPLE__ || _WIN32) +#if !defined(__APPLE__) && !defined(_WIN32) if (this->dummyDisplay) { Display *x11Display = static_cast(this->dummyDisplay); @@ -328,7 +328,7 @@ void Ogre2RenderEngine::CreateLogger() ////////////////////////////////////////////////// void Ogre2RenderEngine::CreateContext() { -#if not (__APPLE__ || _WIN32) +#if !defined(__APPLE__) && !defined(_WIN32) // create X11 display this->dummyDisplay = XOpenDisplay(0); Display *x11Display = static_cast(this->dummyDisplay); diff --git a/ogre2/src/Ogre2RenderTarget.cc b/ogre2/src/Ogre2RenderTarget.cc index fdefbf797..d49ae2a48 100644 --- a/ogre2/src/Ogre2RenderTarget.cc +++ b/ogre2/src/Ogre2RenderTarget.cc @@ -764,9 +764,16 @@ void Ogre2RenderTarget::RebuildMaterial() ////////////////////////////////////////////////// // Ogre2RenderTexture ////////////////////////////////////////////////// +#ifndef _WIN32 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif Ogre2RenderTexture::Ogre2RenderTexture() { } +#ifndef _WIN32 +#pragma GCC diagnostic pop +#endif ////////////////////////////////////////////////// Ogre2RenderTexture::~Ogre2RenderTexture()