From 5bef02f46b1a2940a097b4865e3a839193beb8d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 30 Jul 2012 22:08:27 +0200 Subject: [PATCH] Fixed compiler warnings for EglContext. X11 macros are a mess with a lot of C-style casts, disabled the warnings for this file. Also anonymized unused constructor parameters. --- src/Contexts/CMakeLists.txt | 2 ++ src/Contexts/EglContext.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Contexts/CMakeLists.txt b/src/Contexts/CMakeLists.txt index 2ac978d58..9adde18b6 100644 --- a/src/Contexts/CMakeLists.txt +++ b/src/Contexts/CMakeLists.txt @@ -31,6 +31,8 @@ if(WITH_EGLCONTEXT) find_package(X11) if(EGL_FOUND AND X11_FOUND) add_library(MagnumEglContext STATIC EglContext.cpp) + # X11 macros are a mess, disable warnings for C-style casts + set_target_properties(MagnumEglContext PROPERTIES COMPILE_FLAGS "-Wno-old-style-cast") install(FILES EglContext.h DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Contexts) install(TARGETS MagnumEglContext DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}) else() diff --git a/src/Contexts/EglContext.cpp b/src/Contexts/EglContext.cpp index 4f28ca148..a6f8a842c 100644 --- a/src/Contexts/EglContext.cpp +++ b/src/Contexts/EglContext.cpp @@ -21,7 +21,7 @@ using namespace std; namespace Magnum { namespace Contexts { -EglContext::EglContext(int& argc, char** argv, const string& title, const Math::Vector2& size): viewportSize(size) { +EglContext::EglContext(int&, char**, const string& title, const Math::Vector2& size): viewportSize(size) { /* Get default X display and root window, init EGL */ xDisplay = XOpenDisplay(0); display = eglGetDisplay(xDisplay);