Skip to content

Commit 6f61fe3

Browse files
authored
Merge pull request #1 from 2Park/c17-compile-errors
Fix compile errors with clang 5.0 with CXX17
2 parents e8e6728 + 747c218 commit 6f61fe3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/StatsdClient.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,12 +176,12 @@ send(const std::string& key, const int value, const std::string& type, const flo
176176
if (isFrequencyOne(frequency))
177177
{
178178
// Sampling rate is 1.0f, no need to specify it
179-
snprintf(buffer, sizeof(buffer), "%s%s:%zd|%s", m_prefix.c_str(), key.c_str(), static_cast<signed size_t>(value), type.c_str());
179+
snprintf(buffer, sizeof(buffer), "%s%s:%zd|%s", m_prefix.c_str(), key.c_str(), static_cast<int64_t>(value), type.c_str());
180180
}
181181
else
182182
{
183183
// Sampling rate is different from 1.0f, hence specify it
184-
snprintf(buffer, sizeof(buffer), "%s%s:%zd|%s|@%.2f", m_prefix.c_str(), key.c_str(), static_cast<signed size_t>(value), type.c_str(), frequency);
184+
snprintf(buffer, sizeof(buffer), "%s%s:%zd|%s|@%.2f", m_prefix.c_str(), key.c_str(), static_cast<int64_t>(value), type.c_str(), frequency);
185185
}
186186

187187
// Send the message via the UDP sender

src/UDPSender.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ UDPSender(
143143
m_batchsize = batchsize.value();
144144

145145
// Define the batching thread
146-
m_batchingThread = std::thread([this] {
146+
m_batchingThread = std::thread([this, batchingWait] {
147147
while (!m_mustExit)
148148
{
149149
std::deque<std::string> stagedMessageQueue;

0 commit comments

Comments
 (0)