Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cppmicroservices] Fix warning C4834 #15177

Merged
merged 1 commit into from
Dec 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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