From 8d259fd07ca8d1826612e8023141a2b762ce67b2 Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Sun, 14 Dec 2025 15:42:19 +0100 Subject: [PATCH] graphics/hvif-tools: fix build on ARM / POWER /wrkdirs/usr/ports/graphics/hvif-tools/work/hvif-tools-2.1.0/src/tracer/processing/PathScanner.cpp:20:4: error: constant expression evaluates to -1 which cannot be narrowed to type 'char' [-Wc++11-narrowing] 20 | {{-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}}, // 0 | ^~ /wrkdirs/usr/ports/graphics/hvif-tools/work/hvif-tools-2.1.0/src/tracer/processing/PathScanner.cpp:20:4: note: insert an explicit cast to silence this issue 20 | {{-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}}, // 0 | ^~ | static_cast( ) --- ...atch-src_tracer_processing_PathScanner.cpp | 20 +++++++++++++++++++ .../patch-src_tracer_processing_PathScanner.h | 11 ++++++++++ 2 files changed, 31 insertions(+) create mode 100644 graphics/hvif-tools/files/patch-src_tracer_processing_PathScanner.cpp create mode 100644 graphics/hvif-tools/files/patch-src_tracer_processing_PathScanner.h diff --git a/graphics/hvif-tools/files/patch-src_tracer_processing_PathScanner.cpp b/graphics/hvif-tools/files/patch-src_tracer_processing_PathScanner.cpp new file mode 100644 index 000000000000..182410f1283f --- /dev/null +++ b/graphics/hvif-tools/files/patch-src_tracer_processing_PathScanner.cpp @@ -0,0 +1,20 @@ +--- src/tracer/processing/PathScanner.cpp.orig 2025-12-14 12:31:31 UTC ++++ src/tracer/processing/PathScanner.cpp +@@ -16,7 +16,7 @@ const bool PathScanner::kPathScanHolePathLookup[16] = + false, false, false, true, false, true, true, false + }; + +-const char PathScanner::kPathScanCombinedLookup[16][4][4] = { ++const signed char PathScanner::kPathScanCombinedLookup[16][4][4] = { + {{-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}}, // 0 + {{ 0, 1, 0,-1}, {-1,-1,-1,-1}, {-1,-1,-1,-1}, { 0, 2,-1, 0}}, // 1 + {{-1,-1,-1,-1}, {-1,-1,-1,-1}, { 0, 1, 0,-1}, { 0, 0, 1, 0}}, // 2 +@@ -137,7 +137,7 @@ PathScanner::ScanPaths(std::vector >& + break; + } + +- const char* lookupRow = kPathScanCombinedLookup[code][direction]; ++ const signed char* lookupRow = kPathScanCombinedLookup[code][direction]; + + if (lookupRow[1] < 0) { + pathFinished = true; diff --git a/graphics/hvif-tools/files/patch-src_tracer_processing_PathScanner.h b/graphics/hvif-tools/files/patch-src_tracer_processing_PathScanner.h new file mode 100644 index 000000000000..7b64f82e24ad --- /dev/null +++ b/graphics/hvif-tools/files/patch-src_tracer_processing_PathScanner.h @@ -0,0 +1,11 @@ +--- src/tracer/processing/PathScanner.h.orig 2025-12-14 12:31:58 UTC ++++ src/tracer/processing/PathScanner.h +@@ -35,7 +35,7 @@ class PathScanner { (private) + private: + static const unsigned char kPathScanDirectionLookup[16]; + static const bool kPathScanHolePathLookup[16]; +- static const char kPathScanCombinedLookup[16][4][4]; ++ static const signed char kPathScanCombinedLookup[16][4][4]; + }; + + #endif