aboutsummaryrefslogtreecommitdiffstats
path: root/main/dvgrab/fix-narrowing.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-11-02 17:05:18 +0200
committerTimo Teräs <timo.teras@iki.fi>2016-11-02 17:05:53 +0200
commit0c1428c0a82b0ffb4613979c6a4f0ba499e27a60 (patch)
treef2be6c9cc9de74f21198c70475d4bc1a6fe1608a /main/dvgrab/fix-narrowing.patch
parent651cc55068935d0d6dc0c39d08c127360ba05f90 (diff)
downloadaports-0c1428c0a82b0ffb4613979c6a4f0ba499e27a60.tar.gz
aports-0c1428c0a82b0ffb4613979c6a4f0ba499e27a60.tar.bz2
aports-0c1428c0a82b0ffb4613979c6a4f0ba499e27a60.tar.xz
main/dvgrab: fix gcc6 build, and simplify aport
build fix from upstream git
Diffstat (limited to 'main/dvgrab/fix-narrowing.patch')
-rw-r--r--main/dvgrab/fix-narrowing.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/main/dvgrab/fix-narrowing.patch b/main/dvgrab/fix-narrowing.patch
new file mode 100644
index 0000000000..169f8a3c14
--- /dev/null
+++ b/main/dvgrab/fix-narrowing.patch
@@ -0,0 +1,27 @@
+From 8dd729f2cf4cc5b99ad2e3961419cf71d2dfb843 Mon Sep 17 00:00:00 2001
+From: Aaro Koskinen <aaro.koskinen@iki.fi>
+Date: Sun, 15 May 2016 22:44:23 +0300
+Subject: [PATCH] iec13818-1.h: fix build with GCC 6.1.0
+
+Fix the following build issue with GCC 6.1.0:
+
+iec13818-1.h:45:75: error: narrowing conversion of '255' from 'int' to 'char' inside { } [-Wnarrowing]
+ static char bitmask[8] = { 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
+ ^
+---
+ iec13818-1.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/iec13818-1.h b/iec13818-1.h
+index 56a4aa0..e964288 100644
+--- a/iec13818-1.h
++++ b/iec13818-1.h
+@@ -42,7 +42,7 @@
+ #define BCD(c) ( ((((c) >> 4) & 0x0f) * 10) + ((c) & 0x0f) )
+
+ #define TOBYTES( n ) ( ( n + 7 ) / 8 )
+-static char bitmask[8] = { 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
++static unsigned char bitmask[8] = { 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff };
+ #define GETBITS( offset, len ) do { \
+ unsigned long value = 0; \
+ while ( len > 0 ) \