From bbfe37b081e298505b3937d2c6ccdb6797c2b4fe Mon Sep 17 00:00:00 2001 From: Allen-Webb Date: Thu, 1 Aug 2019 09:58:21 -0700 Subject: [PATCH 1/2] Add missing lambda return types. --- src/Common/Utility.hpp | 2 +- src/Library/UMockdevDeviceManager.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Common/Utility.hpp b/src/Common/Utility.hpp index ba4193e5..45c8f3a1 100644 --- a/src/Common/Utility.hpp +++ b/src/Common/Utility.hpp @@ -189,7 +189,7 @@ namespace usbguard std::function filter, std::function loader, std::function&, const std::pair&)> sorter = \ - [](const std::pair& a, const std::pair& b) + [](const std::pair& a, const std::pair& b) -> bool { return a.first < b.first; }, diff --git a/src/Library/UMockdevDeviceManager.cpp b/src/Library/UMockdevDeviceManager.cpp index 84497ffa..ad1b7c80 100644 --- a/src/Library/UMockdevDeviceManager.cpp +++ b/src/Library/UMockdevDeviceManager.cpp @@ -289,7 +289,7 @@ namespace usbguard _umockdev_deviceroot = std::string(envval); _testbed.reset(umockdev_testbed_new()); USBGUARD_LOG(Info) << "umockdev device directory set to " << _umockdev_deviceroot; - const auto lambdaUMockdevFilterEntry = [](const std::string& fullpath, const struct dirent* dirent) { + const auto lambdaUMockdevFilterEntry = [](const std::string& fullpath, const struct dirent* dirent) -> std::string { (void)dirent; struct stat st = {}; @@ -305,7 +305,7 @@ namespace usbguard return std::string(); } }; - const auto lambdaUMockdevAddFromFile = [this](const std::string& fullpath, const std::string& loadpath) { + const auto lambdaUMockdevAddFromFile = [this](const std::string& fullpath, const std::string& loadpath) -> int { (void)fullpath; for (const auto& device_path : umockdevLoadFromFile(loadpath)) { From fc330a85725fe602ca4d7970dcafa1d958d6030b Mon Sep 17 00:00:00 2001 From: Allen-Webb Date: Fri, 2 Aug 2019 11:29:50 -0700 Subject: [PATCH 2/2] Fix return check of ldap tests. --- src/Tests/LDAP/UseCase/ldap-test-1.sh | 2 +- src/Tests/LDAP/UseCase/ldap-test-2.sh | 2 +- src/Tests/LDAP/UseCase/ldap-test-5.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Tests/LDAP/UseCase/ldap-test-1.sh b/src/Tests/LDAP/UseCase/ldap-test-1.sh index ffaa88c9..bf309b31 100755 --- a/src/Tests/LDAP/UseCase/ldap-test-1.sh +++ b/src/Tests/LDAP/UseCase/ldap-test-1.sh @@ -133,4 +133,4 @@ fi nss_restore -exit $(( $RC + $GREP + $KILLRC )) +exit $(( $RC + $GREP1 + $GREP2 + $KILLRC )) diff --git a/src/Tests/LDAP/UseCase/ldap-test-2.sh b/src/Tests/LDAP/UseCase/ldap-test-2.sh index 04c2e8c1..bc2253e9 100755 --- a/src/Tests/LDAP/UseCase/ldap-test-2.sh +++ b/src/Tests/LDAP/UseCase/ldap-test-2.sh @@ -133,4 +133,4 @@ fi nss_restore -exit $(( $RC + $GREP + $KILLRC )) +exit $(( $RC + $GREP1 + $GREP2 + $KILLRC )) diff --git a/src/Tests/LDAP/UseCase/ldap-test-5.sh b/src/Tests/LDAP/UseCase/ldap-test-5.sh index 80d2eac2..21d9b2bf 100755 --- a/src/Tests/LDAP/UseCase/ldap-test-5.sh +++ b/src/Tests/LDAP/UseCase/ldap-test-5.sh @@ -198,4 +198,4 @@ fi nss_restore -exit $(( $RC + $GREP + $KILLRC + $WC + $DIFF )) +exit $(( $RC + $GREP1 + $GREP2 + $KILLRC + $WC + $DIFF ))