aboutsummaryrefslogtreecommitdiff
path: root/ports/cppmicroservices
diff options
context:
space:
mode:
authorCheney Wang <38240633+Cheney-W@users.noreply.github.com>2020-12-18 13:20:39 +0800
committerGitHub <noreply@github.com>2020-12-17 21:20:39 -0800
commitfe5852514a5cf82a3fadec6b9458caf134c451f1 (patch)
treeef8aff6012279b85657bab82180212d92b343937 /ports/cppmicroservices
parentce5d30cb96f50d643a6a2c8dd5990e1d9b73323f (diff)
downloadvcpkg-fe5852514a5cf82a3fadec6b9458caf134c451f1.tar.gz
vcpkg-fe5852514a5cf82a3fadec6b9458caf134c451f1.zip
[cppmicroservices] Fix warning C4834 (#15177)
Co-authored-by: Cheney-Wang <v-xincwa@microsoft.com>
Diffstat (limited to 'ports/cppmicroservices')
-rw-r--r--ports/cppmicroservices/CONTROL3
-rw-r--r--ports/cppmicroservices/fix-warning-c4834.patch25
-rw-r--r--ports/cppmicroservices/portfile.cmake2
3 files changed, 28 insertions, 2 deletions
diff --git a/ports/cppmicroservices/CONTROL b/ports/cppmicroservices/CONTROL
index 91748199f..2db76b91d 100644
--- a/ports/cppmicroservices/CONTROL
+++ b/ports/cppmicroservices/CONTROL
@@ -1,5 +1,6 @@
Source: cppmicroservices
-Version: 3.4.0-1
+Version: 3.4.0
+Port-Version: 2
Homepage: https://github.com/CppMicroServices/CppMicroServices
Description: An OSGi-like C++ dynamic module system and service registry
Build-Depends: gtest \ No newline at end of file
diff --git a/ports/cppmicroservices/fix-warning-c4834.patch b/ports/cppmicroservices/fix-warning-c4834.patch
new file mode 100644
index 000000000..893b28d30
--- /dev/null
+++ b/ports/cppmicroservices/fix-warning-c4834.patch
@@ -0,0 +1,25 @@
+diff --git a/httpservice/src/ServletContainer.cpp b/httpservice/src/ServletContainer.cpp
+index b4af8c9..8713066 100644
+--- a/httpservice/src/ServletContainer.cpp
++++ b/httpservice/src/ServletContainer.cpp
+@@ -279,7 +279,9 @@ void ServletContainer::SetContextPath(const std::string& path)
+
+ std::string ServletContainer::GetContextPath() const
+ {
+- return Lock(d->m_Mutex), d->m_ContextPath;
++ Lock l(d->m_Mutex);
++ US_UNUSED(l);
++ return d->m_ContextPath;
+ }
+
+ void ServletContainer::Start()
+@@ -306,6 +308,8 @@ std::shared_ptr<ServletContext> ServletContainer::GetContext(
+ std::string ServletContainer::GetContextPath(
+ const ServletContext* /*context*/) const
+ {
+- return Lock(d->m_Mutex), d->m_ContextPath;
++ Lock l(d->m_Mutex);
++ US_UNUSED(l);
++ return d->m_ContextPath;
+ }
+ }
diff --git a/ports/cppmicroservices/portfile.cmake b/ports/cppmicroservices/portfile.cmake
index 47df1e14e..47c209a87 100644
--- a/ports/cppmicroservices/portfile.cmake
+++ b/ports/cppmicroservices/portfile.cmake
@@ -7,6 +7,7 @@ vcpkg_from_github(
PATCHES
werror.patch
fix-dependency-gtest.patch
+ fix-warning-c4834.patch
)
vcpkg_configure_cmake(
@@ -22,7 +23,6 @@ vcpkg_install_cmake()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
-
vcpkg_fixup_cmake_targets()
# Handle copyright