Permalink
Browse files

Fix warnings for clang

  • Loading branch information...
scheibel committed May 11, 2017
1 parent ced0499 commit 78c2524b1fb2b674b1223ed2549409019179f24b
@@ -74,7 +74,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC")
/wd4251 # -> disable warning: 'identifier': class 'type' needs to have dll-interface to be used by clients of class 'type2'
/wd4592 # -> disable warning: 'identifier': symbol will be dynamically initialized (implementation limitation)
/wd4201 # -> disable warning: nonstandard extension used: nameless struct/union (caused by GLM)
# /wd4127 # -> disable warning: conditional expression is constant (caused by Qt)
/wd4127 # -> disable warning: conditional expression is constant (caused by Qt)
/wd4800 # -> disable warning: 'type' : forcing value to bool 'true' or 'false' (caused by Qt)
/wd4244 # -> disable warning: 'conversion' conversion from 'type1' to 'type2', possible loss of data (caused by Qt)
#$<$<CONFIG:Debug>:
#/RTCc # -> value is assigned to a smaller data type and results in a data loss
@@ -111,12 +113,12 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCH
-Wswitch-default
-Wuninitialized
-Wmissing-field-initializers
-Wno-unknown-pragmas
$<$<CXX_COMPILER_ID:GNU>:
-Wmaybe-uninitialized
-Wno-unknown-pragmas
$<$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,4.8>:
-Wpedantic
@@ -1,13 +1,10 @@
#include "WindowQt.h"
#pragma warning(push)
#pragma warning(disable: 4127 4800 4244)
#include <QApplication>
#include <QDebug>
#include <QResizeEvent>
#include <QSurfaceFormat>
#include <QOpenGLContext>
#pragma warning(pop)
QSurfaceFormat defaultFormat()
@@ -1,11 +1,8 @@
#pragma once
#pragma warning(push)
#pragma warning(disable: 4127)
#include <QWindow>
#include <QScopedPointer>
#pragma warning(pop)
class QSurfaceFormat;
@@ -20,7 +17,7 @@ class WindowQt : public QWindow
virtual void resizeEvent(QResizeEvent * event) override;
virtual void exposeEvent(QExposeEvent * event) override;
bool event(QEvent * event);
bool event(QEvent * event) override;
virtual void enterEvent(QEvent * event);
virtual void leaveEvent(QEvent * event);
@@ -2,13 +2,10 @@
#include <iostream>
#include <algorithm>
#pragma warning(push)
#pragma warning(disable: 4127)
#include <QApplication>
#include <QMainWindow>
#include <QResizeEvent>
#include <QSurfaceFormat>
#pragma warning(pop)
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
@@ -27,15 +27,15 @@ class FramebufferImplementation_DirectStateAccessARB : public AbstractFramebuffe
virtual void setDrawBuffer(const Framebuffer * fbo, gl::GLenum mode) const override;
virtual void setDrawBuffers(const Framebuffer * fbo, gl::GLsizei n, const gl::GLenum * modes) const override;
virtual void clear(const Framebuffer * fbo, gl::ClearBufferMask mask) const;
virtual void clearBufferiv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLint * value) const;
virtual void clearBufferuiv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLuint * value) const;
virtual void clearBufferfv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLfloat * value) const;
virtual void clearBufferfi(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, gl::GLfloat depth, gl::GLint stencil) const;
virtual void clear(const Framebuffer * fbo, gl::ClearBufferMask mask) const override;
virtual void clearBufferiv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLint * value) const override;
virtual void clearBufferuiv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLuint * value) const override;
virtual void clearBufferfv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLfloat * value) const override;
virtual void clearBufferfi(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, gl::GLfloat depth, gl::GLint stencil) const override;
virtual void readPixels(const Framebuffer * fbo, const gl::GLint x, const gl::GLint y, const gl::GLsizei width, const gl::GLsizei height, const gl::GLenum format, const gl::GLenum type, gl::GLvoid * data) const;
virtual void readPixels(const Framebuffer * fbo, const gl::GLint x, const gl::GLint y, const gl::GLsizei width, const gl::GLsizei height, const gl::GLenum format, const gl::GLenum type, gl::GLvoid * data) const override;
virtual void blit(const Framebuffer * sourceFbo, const Framebuffer * targetFbo, gl::GLint srcX0, gl::GLint srcY0, gl::GLint srcX1, gl::GLint srcY1, gl::GLint destX0, gl::GLint destY0, gl::GLint destX1, gl::GLint destY1, gl::ClearBufferMask mask, gl::GLenum filter) const;
virtual void blit(const Framebuffer * sourceFbo, const Framebuffer * targetFbo, gl::GLint srcX0, gl::GLint srcY0, gl::GLint srcX1, gl::GLint srcY1, gl::GLint destX0, gl::GLint destY0, gl::GLint destX1, gl::GLint destY1, gl::ClearBufferMask mask, gl::GLenum filter) const override;
};
@@ -27,15 +27,15 @@ class FramebufferImplementation_DirectStateAccessEXT : public AbstractFramebuffe
virtual void setDrawBuffer(const Framebuffer * fbo, gl::GLenum mode) const override;
virtual void setDrawBuffers(const Framebuffer * fbo, gl::GLsizei n, const gl::GLenum * modes) const override;
virtual void clear(const Framebuffer * fbo, gl::ClearBufferMask mask) const;
virtual void clearBufferiv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLint * value) const;
virtual void clearBufferuiv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLuint * value) const;
virtual void clearBufferfv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLfloat * value) const;
virtual void clearBufferfi(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, gl::GLfloat depth, gl::GLint stencil) const;
virtual void clear(const Framebuffer * fbo, gl::ClearBufferMask mask) const override;
virtual void clearBufferiv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLint * value) const override;
virtual void clearBufferuiv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLuint * value) const override;
virtual void clearBufferfv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLfloat * value) const override;
virtual void clearBufferfi(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, gl::GLfloat depth, gl::GLint stencil) const override;
virtual void readPixels(const Framebuffer * fbo, const gl::GLint x, const gl::GLint y, const gl::GLsizei width, const gl::GLsizei height, const gl::GLenum format, const gl::GLenum type, gl::GLvoid * data) const;
virtual void readPixels(const Framebuffer * fbo, const gl::GLint x, const gl::GLint y, const gl::GLsizei width, const gl::GLsizei height, const gl::GLenum format, const gl::GLenum type, gl::GLvoid * data) const override;
virtual void blit(const Framebuffer * sourceFbo, const Framebuffer * targetFbo, gl::GLint srcX0, gl::GLint srcY0, gl::GLint srcX1, gl::GLint srcY1, gl::GLint destX0, gl::GLint destY0, gl::GLint destX1, gl::GLint destY1, gl::ClearBufferMask mask, gl::GLenum filter) const;
virtual void blit(const Framebuffer * sourceFbo, const Framebuffer * targetFbo, gl::GLint srcX0, gl::GLint srcY0, gl::GLint srcX1, gl::GLint srcY1, gl::GLint destX0, gl::GLint destY0, gl::GLint destX1, gl::GLint destY1, gl::ClearBufferMask mask, gl::GLenum filter) const override;
};
@@ -27,15 +27,15 @@ class FramebufferImplementation_Legacy : public AbstractFramebufferImplementatio
virtual void setDrawBuffer(const Framebuffer * fbo, gl::GLenum mode) const override;
virtual void setDrawBuffers(const Framebuffer * fbo, gl::GLsizei n, const gl::GLenum * modes) const override;
virtual void clear(const Framebuffer * fbo, gl::ClearBufferMask mask) const;
virtual void clearBufferiv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLint * value) const;
virtual void clearBufferuiv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLuint * value) const;
virtual void clearBufferfv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLfloat * value) const;
virtual void clearBufferfi(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, gl::GLfloat depth, gl::GLint stencil) const;
virtual void clear(const Framebuffer * fbo, gl::ClearBufferMask mask) const override;
virtual void clearBufferiv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLint * value) const override;
virtual void clearBufferuiv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLuint * value) const override;
virtual void clearBufferfv(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, const gl::GLfloat * value) const override;
virtual void clearBufferfi(const Framebuffer * fbo, gl::GLenum buffer, gl::GLint drawBuffer, gl::GLfloat depth, gl::GLint stencil) const override;
virtual void readPixels(const Framebuffer * fbo, const gl::GLint x, const gl::GLint y, const gl::GLsizei width, const gl::GLsizei height, const gl::GLenum format, const gl::GLenum type, gl::GLvoid * data) const;
virtual void readPixels(const Framebuffer * fbo, const gl::GLint x, const gl::GLint y, const gl::GLsizei width, const gl::GLsizei height, const gl::GLenum format, const gl::GLenum type, gl::GLvoid * data) const override;
virtual void blit(const Framebuffer * sourceFbo, const Framebuffer * targetFbo, gl::GLint srcX0, gl::GLint srcY0, gl::GLint srcX1, gl::GLint srcY1, gl::GLint destX0, gl::GLint destY0, gl::GLint destX1, gl::GLint destY1, gl::ClearBufferMask mask, gl::GLenum filter) const;
virtual void blit(const Framebuffer * sourceFbo, const Framebuffer * targetFbo, gl::GLint srcX0, gl::GLint srcY0, gl::GLint srcX1, gl::GLint srcY1, gl::GLint destX0, gl::GLint destY0, gl::GLint destX1, gl::GLint destY1, gl::ClearBufferMask mask, gl::GLenum filter) const override;
};

0 comments on commit 78c2524

Please sign in to comment.