git: 8d259fd07ca8 - main - graphics/hvif-tools: fix build on ARM / POWER
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 14 Dec 2025 14:50:18 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=8d259fd07ca8d1826612e8023141a2b762ce67b2
commit 8d259fd07ca8d1826612e8023141a2b762ce67b2
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2025-12-14 14:42:19 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2025-12-14 14:44:25 +0000
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<char>( )
---
.../patch-src_tracer_processing_PathScanner.cpp | 20 ++++++++++++++++++++
.../files/patch-src_tracer_processing_PathScanner.h | 11 +++++++++++
2 files changed, 31 insertions(+)
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<std::vector<int> >&
+ 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