aboutsummaryrefslogtreecommitdiff
path: root/net-p2p
diff options
context:
space:
mode:
authorRaphael Kubo da Costa <rakuco@FreeBSD.org>2018-01-15 17:16:26 +0000
committerRaphael Kubo da Costa <rakuco@FreeBSD.org>2018-01-15 17:16:26 +0000
commit247c88e1347cf6726bcb049540175d7d42eb383d (patch)
tree5c2116b50d6b8a1043733078c39c433ed0e07064 /net-p2p
parent9055fd3714dbfb2de54d0692bd5079027504ade9 (diff)
downloadports-247c88e1347cf6726bcb049540175d7d42eb383d.tar.gz
ports-247c88e1347cf6726bcb049540175d7d42eb383d.zip
Backport a patch to fix the build with clang 6.0.
/wrkdirs/usr/ports/net-p2p/ktorrent/work/ktorrent-4.3.1/libktcore/torrent/chunkbarrenderer.cpp:68:16: error: non-constant-expression cannot be narrowed from type 'bt::Uint32' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing] PR: 224945 Reported by: pkg-fallout
Notes
Notes: svn path=/head/; revision=459089
Diffstat (limited to 'net-p2p')
-rw-r--r--net-p2p/ktorrent/files/patch-git_4862260341
1 files changed, 41 insertions, 0 deletions
diff --git a/net-p2p/ktorrent/files/patch-git_48622603 b/net-p2p/ktorrent/files/patch-git_48622603
new file mode 100644
index 000000000000..a808d51e9674
--- /dev/null
+++ b/net-p2p/ktorrent/files/patch-git_48622603
@@ -0,0 +1,41 @@
+Backport adapted to version 4.3.1. Fixes the build with clang 6.0:
+
+ /wrkdirs/usr/ports/net-p2p/ktorrent/work/ktorrent-4.3.1/libktcore/torrent/chunkbarrenderer.cpp:68:16: error: non-constant-expression cannot be narrowed from type 'bt::Uint32' (aka 'unsigned int') to 'int' in initializer list [-Wc++11-narrowing]
+
+From 48622603e48bfc51d7ae284a6dab18e853db61c7 Mon Sep 17 00:00:00 2001
+From: Aleix Pol <aleixpol@kde.org>
+Date: Wed, 17 Feb 2016 00:16:08 +0100
+Subject: [PATCH] Fix build with clang
+
+Reduce implicit type conversions.
+
+REVIEW: 127087
+--- libktcore/torrent/chunkbarrenderer.cpp
++++ libktcore/torrent/chunkbarrenderer.cpp
+@@ -28,7 +28,7 @@ namespace kt
+ {
+ struct Range
+ {
+- int first,last;
++ Uint32 first,last;
+ int fac;
+ };
+
+@@ -71,7 +71,7 @@ namespace kt
+ else
+ {
+ Range & l = rs.last();
+- if (l.last == int(i - 1))
++ if (l.last == i - 1)
+ {
+ l.last = i;
+ }
+@@ -120,7 +120,7 @@ namespace kt
+ else
+ {
+ Range & l = rs.last();
+- if (l.last == int(i - 1) && l.fac == fac)
++ if (l.last == i - 1 && l.fac == fac)
+ {
+ l.last = i;
+ }