From f71c2d02294fb3ceb7b19a93a6913f97c4ff2b7a Mon Sep 17 00:00:00 2001 From: Bo Xu Date: Tue, 21 Oct 2014 12:04:41 -0700 Subject: Add missing parenthesis in FXARGB_GETDIB macro You can get warning when using FXARGB_GETDIB() with & operation in the same statement like: FXARGB_GETDIB(src_scan) & 0xffffff in fx_dib_composite.cpp: ../../third_party/pdfium/core/src/fxge/dib/fx_dib_composite.cpp:737:205: error: '&' within '|' [-Werror,-Wbitwise-op-parentheses] Original patch from jiangj@opera.com R=thakis@chromium.org Review URL: https://codereview.chromium.org/578253002 --- AUTHORS | 1 + core/include/fxge/fx_dib.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/AUTHORS b/AUTHORS index 4dc71c83fa..332b853110 100644 --- a/AUTHORS +++ b/AUTHORS @@ -26,6 +26,7 @@ Raymes Khoury Reid Kleckner Robert Sesek Thomas Sepez +Jiang Jiang Foxit Software Inc <*@foxitsoftware.com> Google Inc. <*@google.com> diff --git a/core/include/fxge/fx_dib.h b/core/include/fxge/fx_dib.h index 957a957043..d8a2003548 100644 --- a/core/include/fxge/fx_dib.h +++ b/core/include/fxge/fx_dib.h @@ -105,7 +105,7 @@ FX_ARGB ArgbEncode(int a, FX_COLORREF rgb); ((FX_LPBYTE)(p))[1] = (FX_BYTE)((cmyk) >> 16), \ ((FX_LPBYTE)(p))[2] = (FX_BYTE)((cmyk) >> 8), \ ((FX_LPBYTE)(p))[3] = (FX_BYTE)(cmyk)) -#define FXARGB_GETDIB(p) (((FX_LPBYTE)(p))[0]) | (((FX_LPBYTE)(p))[1] << 8) | (((FX_LPBYTE)(p))[2] << 16) | (((FX_LPBYTE)(p))[3] << 24) +#define FXARGB_GETDIB(p) ((((FX_LPBYTE)(p))[0]) | (((FX_LPBYTE)(p))[1] << 8) | (((FX_LPBYTE)(p))[2] << 16) | (((FX_LPBYTE)(p))[3] << 24)) #define FXARGB_SETDIB(p, argb) ((FX_LPBYTE)(p))[0] = (FX_BYTE)(argb), \ ((FX_LPBYTE)(p))[1] = (FX_BYTE)((argb) >> 8), \ ((FX_LPBYTE)(p))[2] = (FX_BYTE)((argb) >> 16), \ -- cgit v1.2.3