From 38fa5107bf7d40ad53c1074d2257c344e632fd21 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Tue, 29 Jun 2021 15:51:50 +0900 Subject: [PATCH] sw_engine rle: -- sanitizer reports. The code is actually intended, we can modify it to ignore the annoying sanitizer reports. @Issue: https://github.com/Samsung/thorvg/issues/483 --- src/lib/sw_engine/tvgSwRle.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/sw_engine/tvgSwRle.cpp b/src/lib/sw_engine/tvgSwRle.cpp index 1b319c20..44236db5 100644 --- a/src/lib/sw_engine/tvgSwRle.cpp +++ b/src/lib/sw_engine/tvgSwRle.cpp @@ -94,7 +94,7 @@ struct RleWorker static inline SwPoint UPSCALE(const SwPoint& pt) { - return {pt.x << (PIXEL_BITS - 6), pt.y << (PIXEL_BITS - 6)}; + return {SwCoord(ulong(pt.x) << (PIXEL_BITS - 6)), SwCoord(ulong(pt.y) << (PIXEL_BITS - 6))}; } @@ -112,13 +112,13 @@ static inline SwCoord TRUNC(const SwCoord x) static inline SwPoint SUBPIXELS(const SwPoint& pt) { - return {pt.x << PIXEL_BITS, pt.y << PIXEL_BITS}; + return {SwCoord(ulong(pt.x) << PIXEL_BITS), SwCoord(ulong(pt.y) << PIXEL_BITS)}; } static inline SwCoord SUBPIXELS(const SwCoord x) { - return (x << PIXEL_BITS); + return SwCoord(ulong(x) << PIXEL_BITS); } /*