fix compile warnings 37/240437/1
authorHermet Park <chuneon.park@samsung.com>
Thu, 6 Aug 2020 08:06:36 +0000 (17:06 +0900)
committerHermet Park <chuneon.park@samsung.com>
Thu, 6 Aug 2020 08:06:36 +0000 (17:06 +0900)
comparison of unsigned expression < 0 is always false [-Werror=type-limits]

Change-Id: I8cee625056bcde1f2a3cb2b9ce704b33be5bd725

src/lib/sw_engine/tvgSwRle.cpp
src/lib/tvgShape.cpp

index d88a837..049c1ca 100644 (file)
@@ -572,8 +572,6 @@ static bool _decomposeOutline(RleWorker& rw)
 
     for (uint32_t n = 0; n < outline->cntrsCnt; ++n) {
         auto last = outline->cntrs[n];
-        if (last < 0) goto invalid_outline;
-
         auto limit = outline->pts + last;
         assert(limit);
 
index 53c7689..053c348 100644 (file)
@@ -79,7 +79,7 @@ uint32_t Shape::pathCoords(const Point** pts) const noexcept
 
 Result Shape::appendPath(const PathCommand *cmds, uint32_t cmdCnt, const Point* pts, uint32_t ptsCnt) noexcept
 {
-    if (cmdCnt < 0 || ptsCnt < 0 || !pts || !ptsCnt) return Result::InvalidArguments;
+    if (cmdCnt == 0 || ptsCnt == 0 || !pts || !ptsCnt) return Result::InvalidArguments;
 
     IMPL->path->grow(cmdCnt, ptsCnt);
     IMPL->path->append(cmds, cmdCnt, pts, ptsCnt);