summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-01-03 14:39:46 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-01-03 18:09:49 +0100
commit5b8f505cd11517362b2c4a29c87d802a286a677d (patch)
tree92e4ff6c4dc9fbab78391eb200fb6d9adeb08421
parent50b5f0a3cb864f5e58429946098a80235fa528fa (diff)
Avoid -Werror,-Wdeprecated-anon-enum-enum-conversion
...with Clang 10 trunk: > vcl/quartz/salgdicommon.cxx:1299:59: error: bitwise operation between different enumeration types ('CGImageAlphaInfo' and '(anonymous enum at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreGraphics.framework/Headers/CGImage.h:51:9)') is deprecated [-Werror,-Wdeprecated-anon-enum-enum-conversion] > kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Big ); > ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~ <https://developer.apple.com/documentation/coregraphics/ 1455939-cgbitmapcontextcreate> documents the "uint32_t bitmapInfo" parameter of CGBitmapContextCreate as: "The constants for specifying the alpha channel information are declared with the CGImageAlphaInfo type but can be passed to this parameter safely. You can also pass the other constants associated with the CGBitmapInfo type." Change-Id: Idee410c65bd022a125a2f5a34cda007a8ca07580 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86175 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--vcl/quartz/salgdicommon.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/vcl/quartz/salgdicommon.cxx b/vcl/quartz/salgdicommon.cxx
index c7cc31a5555f..f5f1aba8b41a 100644
--- a/vcl/quartz/salgdicommon.cxx
+++ b/vcl/quartz/salgdicommon.cxx
@@ -1296,7 +1296,7 @@ Color AquaSalGraphics::getPixel( long nX, long nY )
CGContextRef xOnePixelContext =
CGBitmapContextCreate( &aPixel, 1, 1, 8, 32,
GetSalData()->mxRGBSpace,
- kCGImageAlphaNoneSkipFirst | kCGBitmapByteOrder32Big );
+ uint32_t(kCGImageAlphaNoneSkipFirst) | uint32_t(kCGBitmapByteOrder32Big) );
// update this graphics layer
ApplyXorContext();