svn commit: r459089 - head/net-p2p/ktorrent/files

Raphael Kubo da Costa rakuco at FreeBSD.org
Mon Jan 15 17:16:31 UTC 2018


Author: rakuco
Date: Mon Jan 15 17:16:26 2018
New Revision: 459089
URL: https://svnweb.freebsd.org/changeset/ports/459089

Log:
  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

Added:
  head/net-p2p/ktorrent/files/patch-git_48622603   (contents, props changed)

Added: head/net-p2p/ktorrent/files/patch-git_48622603
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net-p2p/ktorrent/files/patch-git_48622603	Mon Jan 15 17:16:26 2018	(r459089)
@@ -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 at 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;
+ 				}


More information about the svn-ports-head mailing list