Skip to content

Commit f5d2f3b

Browse files
authored
Merge branch 'apache:main' into boost-fix
2 parents 28ac03d + e5afb63 commit f5d2f3b

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ else() # GCC or Clang are mostly compatible:
9999
add_compile_options(-Wall -Wformat-security -Wvla -Werror)
100100
# Turn off certain warnings that are too much pain for too little gain:
101101
add_compile_options(-Wno-sign-compare -Wno-deprecated-declarations -Wno-error=cpp)
102-
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR APPLE)
102+
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
103103
add_compile_options(-msse4.2 -mpclmul)
104104
endif()
105105
# Options unique to Clang or GCC:

tests/AuthTokenTest.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <pulsar/Client.h>
2323

2424
#include <boost/algorithm/string.hpp>
25+
#include <cctype>
2526
#include <fstream>
2627
#include <streambuf>
2728
#include <string>
@@ -45,6 +46,9 @@ static const std::string tokenPath = TOKEN_PATH;
4546
std::string getToken() {
4647
std::ifstream file(tokenPath);
4748
std::string str((std::istreambuf_iterator<char>(file)), std::istreambuf_iterator<char>());
49+
while (!str.empty() && isspace(str.back())) {
50+
str.pop_back();
51+
}
4852
return str;
4953
}
5054

0 commit comments

Comments
 (0)