From 5b8f505cd11517362b2c4a29c87d802a286a677d Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 3 Jan 2020 14:39:46 +0100 Subject: 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 ); > ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~ 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 --- vcl/quartz/salgdicommon.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vcl') 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(); -- cgit v1.2.3