summaryrefslogtreecommitdiff
path: root/vcl/source/opengl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-09-17 20:39:43 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-09-18 09:38:38 +0200
commitec17c8ec5256386b0197a8ffe5d7cad3e7d70f8f (patch)
tree3dfca98374e151a17f709e1310109f0869025011 /vcl/source/opengl
parente9024b469530a483a1019ccef2b8b664c1696456 (diff)
-Werror=volatile in OpenGLZone
Recent GCC 10 trunk in C++20 mode reports issues like > vcl/inc/opengl/zone.hxx:37:21: error: ‘++’ expression of ‘volatile’-qualified type is deprecated [-Werror=volatile] > 37 | OpenGLZone() { gnEnterCount++; } > | ^~~~~~~~~~~~ so look for a type that is more appropriate here (see the comment added to vcl/inc/opengl/zone.hxx for details). (Though calls like OpenGLZone::isInZone(), comparing gnEnterCount and gnLeaveCount, in OpenGLWatchdogThread::execute are still not done atomically, of course.) Change-Id: Ie5563addc65f629336f89cbccb73f7b9ac5e9870 Reviewed-on: https://gerrit.libreoffice.org/79072 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl/source/opengl')
-rw-r--r--vcl/source/opengl/OpenGLHelper.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/opengl/OpenGLHelper.cxx b/vcl/source/opengl/OpenGLHelper.cxx
index a179f3710d2c..6b9b97a31f1a 100644
--- a/vcl/source/opengl/OpenGLHelper.cxx
+++ b/vcl/source/opengl/OpenGLHelper.cxx
@@ -44,8 +44,8 @@
#endif
static bool volatile gbInShaderCompile = false;
-sal_uInt64 volatile OpenGLZone::gnEnterCount = 0;
-sal_uInt64 volatile OpenGLZone::gnLeaveCount = 0;
+OpenGLZone::AtomicCounter OpenGLZone::gnEnterCount = 0;
+OpenGLZone::AtomicCounter OpenGLZone::gnLeaveCount = 0;
namespace {