Skip to content

Commit

Permalink
Merge pull request #448 from microsoft/master
Browse files Browse the repository at this point in the history
[cppmicroservices] Fix warning C4834 (microsoft#15177)
  • Loading branch information
Jimmy-Hu authored Dec 18, 2020
2 parents abe8a3b + fe58525 commit 2e576ce
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ports/cppmicroservices/CONTROL
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions ports/cppmicroservices/fix-warning-c4834.patch
Original file line number Diff line number Diff line change
@@ -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;
}
}
2 changes: 1 addition & 1 deletion ports/cppmicroservices/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ vcpkg_from_github(
PATCHES
werror.patch
fix-dependency-gtest.patch
fix-warning-c4834.patch
)

vcpkg_configure_cmake(
Expand All @@ -22,7 +23,6 @@ vcpkg_install_cmake()

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)


vcpkg_fixup_cmake_targets()

# Handle copyright
Expand Down

0 comments on commit 2e576ce

Please sign in to comment.