Skip to content

Commit

Permalink
[pulsar-client-cpp] Fixed some compilation issues when enabling -Wall. (
Browse files Browse the repository at this point in the history
  • Loading branch information
tongsucn authored Jul 11, 2020
1 parent a55a405 commit bd44a2b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion pulsar-client-cpp/include/pulsar/Authentication.h
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ typedef std::shared_ptr<Oauth2Flow> FlowPtr;

class CachedToken {
public:
~CachedToken();
virtual ~CachedToken();
virtual bool isExpired() = 0;
virtual AuthenticationDataPtr getAuthData() = 0;

Expand Down
18 changes: 8 additions & 10 deletions pulsar-client-cpp/lib/ClientImpl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -97,20 +97,18 @@ ClientImpl::ClientImpl(const std::string& serviceUrl, const ClientConfiguration&
requestIdGenerator_(0),
closingError(ResultOk) {
std::unique_ptr<LoggerFactory> loggerFactory = clientConfiguration_.impl_->takeLogger();
if (!logger) {
#ifdef USE_LOG4CXX
if (!clientConfiguration_.getLogConfFilePath().empty()) {
// A log4cxx log file was passed through deprecated parameter. Use that to configure Log4CXX
loggerFactory = Log4CxxLoggerFactory::create(clientConfiguration_.getLogConfFilePath());
} else {
// Use default simple console logger
loggerFactory = SimpleLoggerFactory::create();
}
#else
if (!clientConfiguration_.getLogConfFilePath().empty()) {
// A log4cxx log file was passed through deprecated parameter. Use that to configure Log4CXX
loggerFactory = Log4CxxLoggerFactory::create(clientConfiguration_.getLogConfFilePath());
} else {
// Use default simple console logger
loggerFactory = SimpleLoggerFactory::create();
#endif
}
#else
// Use default simple console logger
loggerFactory = SimpleLoggerFactory::create();
#endif
LogUtils::setLoggerFactory(std::move(loggerFactory));

if (serviceUrl_.compare(0, 4, "http") == 0) {
Expand Down

0 comments on commit bd44a2b

Please sign in to comment.