[Libreoffice-commits] core.git: 2 commits - chart2/source external/np_sdk include/vcl solenv/gbuild
Stephan Bergmann
sbergman at redhat.com
Wed Jan 29 23:58:17 PST 2014
chart2/source/view/inc/DummyXShape.hxx | 7 -------
chart2/source/view/main/OpenGLRender.cxx | 5 ++---
external/np_sdk/inc/npapi.h | 7 -------
include/vcl/sysdata.hxx | 7 -------
solenv/gbuild/platform/com_MSC_defs.mk | 3 +++
5 files changed, 5 insertions(+), 24 deletions(-)
New commits:
commit 7abec64c676e6b1a8f7c005a9f4b2c710b69473d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jan 30 08:57:35 2014 +0100
Fix various MSVC warnings in new chart2 OpenGL code
Change-Id: I5de9020f42004e21b58b9d2ef5d41b5338da43ba
diff --git a/chart2/source/view/inc/DummyXShape.hxx b/chart2/source/view/inc/DummyXShape.hxx
index fc70cba..7d2c25e 100644
--- a/chart2/source/view/inc/DummyXShape.hxx
+++ b/chart2/source/view/inc/DummyXShape.hxx
@@ -61,13 +61,6 @@
#include <map>
#include <boost/scoped_ptr.hpp>
-#if defined( _WIN32 )
-#include "prewin.h"
-#include "windows.h"
-#include "postwin.h"
-#endif
-
-
#include <GL/gl.h>
#include <GL/glu.h>
#include <vcl/window.hxx>
diff --git a/chart2/source/view/main/OpenGLRender.cxx b/chart2/source/view/main/OpenGLRender.cxx
index e80e210..474a125 100755
--- a/chart2/source/view/main/OpenGLRender.cxx
+++ b/chart2/source/view/main/OpenGLRender.cxx
@@ -497,7 +497,7 @@ int OpenGLRender::SetLine2DShapePoint(float x, float y, int listLength)
int OpenGLRender::RenderLine2FBO(int)
{
- m_fZStep += 0.001;
+ m_fZStep += 0.001f;
CHECK_GL_ERROR();
glLineWidth(m_fLineWidth);
size_t listNum = m_Line2DShapePointList.size();
@@ -1116,7 +1116,6 @@ bool OpenGLRender::WGLisExtensionSupported(const char *extension)
if ((p==supported || p[-1]==' ') && (p[extlen]=='\0' || p[extlen]==' '))
return 1; // Match
}
- return 1;
}
#endif
@@ -1277,7 +1276,7 @@ int OpenGLRender::RectangleShapePoint(float x, float y, float directionX, float
int OpenGLRender::RenderRectangleShape(bool bBorder, bool bFill)
{
- m_fZStep += 0.001;
+ m_fZStep += 0.001f;
size_t listNum = m_RectangleShapePointList.size();
for (size_t i = 0; i < listNum; i++)
{
commit 3cea15792452ea779e79c572e7287e2fe8ed9740
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jan 30 08:52:15 2014 +0100
Globally disable MSVC warning 4201 (nonstandard extension nameless struct)
...it is caused by some external code (newly so by glm included in chart2) and
does not really add value. (Incidentally, all relevent compilers, Clang, GCC,
and MSVC uniformly support this language extension anyway.)
Change-Id: I5b4c11b5cea0267bf39ac95e9021a5761a4d7b91
diff --git a/external/np_sdk/inc/npapi.h b/external/np_sdk/inc/npapi.h
index e554d2a..d6b1c59 100644
--- a/external/np_sdk/inc/npapi.h
+++ b/external/np_sdk/inc/npapi.h
@@ -51,14 +51,7 @@
#endif
#if defined(_WIN32) && !defined(__SYMBIAN32__)
-#if defined _MSC_VER && _MSC_VER >= 1200
-#pragma warning(push)
-#pragma warning(disable:4201)
-#endif
#include <windef.h>
-#if defined _MSC_VER && _MSC_VER >= 1200
-#pragma warning(pop)
-#endif
#ifndef XP_WIN
#define XP_WIN 1
#endif
diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx
index af65ce6..2328cbe 100644
--- a/include/vcl/sysdata.hxx
+++ b/include/vcl/sysdata.hxx
@@ -41,14 +41,7 @@ typedef struct CGContext *CGContextRef;
#endif
#if defined( WNT )
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable:4201)
-#endif
#include <windef.h>
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
#endif
struct SystemEnvData
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index dbe3c22..f339609 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -72,6 +72,8 @@ gb_AFLAGS := $(AFLAGS)
# C4189: 'identifier' : local variable is initialized but not referenced
+# C4201: nonstandard extension used : nameless struct/union
+
# C4242: 'identifier' : conversion from 'type1' to 'type2', possible
# loss of data
@@ -163,6 +165,7 @@ gb_CXXFLAGS := \
-W4 \
-wd4127 \
-wd4189 \
+ -wd4201 \
-wd4244 \
-wd4245 \
-wd4250 \
More information about the Libreoffice-commits
mailing list