Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 2018 17:16:26 +0000 (UTC)
From:      Raphael Kubo da Costa <rakuco@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r459089 - head/net-p2p/ktorrent/files
Message-ID:  <201801151716.w0FHGQWt062590@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@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;
+ 				}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801151716.w0FHGQWt062590>