svn commit: r451572 - head/devel/cpprestsdk/files
Raphael Kubo da Costa
rakuco at FreeBSD.org
Sun Oct 8 19:59:11 UTC 2017
Author: rakuco
Date: Sun Oct 8 19:59:09 2017
New Revision: 451572
URL: https://svnweb.freebsd.org/changeset/ports/451572
Log:
Backport a patch from upstream to fix the build on HEAD (clang 5).
src/uri/uri.cpp:25:73: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
std::transform(m_scheme.begin(), m_scheme.end(), m_scheme.begin(), [this](utility::char_t c) {
src/uri/uri.cpp:30:67: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
std::transform(m_host.begin(), m_host.end(), m_host.begin(), [this](utility::char_t c) {
Added:
head/devel/cpprestsdk/files/
head/devel/cpprestsdk/files/patch-git_70c1b14f39 (contents, props changed)
Added: head/devel/cpprestsdk/files/patch-git_70c1b14f39
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/cpprestsdk/files/patch-git_70c1b14f39 Sun Oct 8 19:59:09 2017 (r451572)
@@ -0,0 +1,36 @@
+This fixes the build on FreeBSD 12+ (with clang 5).
+
+src/uri/uri.cpp:25:73: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
+ std::transform(m_scheme.begin(), m_scheme.end(), m_scheme.begin(), [this](utility::char_t c) {
+src/uri/uri.cpp:30:67: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
+ std::transform(m_host.begin(), m_host.end(), m_host.begin(), [this](utility::char_t c) {
+
+From 70c1b14f39f5d47984fdd8a31fc357ebb5a37851 Mon Sep 17 00:00:00 2001
+From: Force Charlie <ipvb at qq.com>
+Date: Thu, 20 Jul 2017 14:39:21 +0800
+Subject: [PATCH] fix lambda capture 'this' is not used, clang 5.0 on ubuntu
+ 16.04
+
+---
+ Release/src/uri/uri.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Release/src/uri/uri.cpp b/Release/src/uri/uri.cpp
+index fb395edf..3157b96a 100644
+--- src/uri/uri.cpp
++++ src/uri/uri.cpp
+@@ -22,12 +22,12 @@ utility::string_t uri_components::join()
+ // canonicalize components first
+
+ // convert scheme to lowercase
+- std::transform(m_scheme.begin(), m_scheme.end(), m_scheme.begin(), [this](utility::char_t c) {
++ std::transform(m_scheme.begin(), m_scheme.end(), m_scheme.begin(), [](utility::char_t c) {
+ return (utility::char_t)tolower(c);
+ });
+
+ // convert host to lowercase
+- std::transform(m_host.begin(), m_host.end(), m_host.begin(), [this](utility::char_t c) {
++ std::transform(m_host.begin(), m_host.end(), m_host.begin(), [](utility::char_t c) {
+ return (utility::char_t)tolower(c);
+ });
+
More information about the svn-ports-head
mailing list