summaryrefslogtreecommitdiff
path: root/net/clientnb.cpp
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2017-04-05 11:57:28 +0200
committerJan Holesovsky <kendy@collabora.com>2017-04-05 12:03:33 +0200
commit37387518f43f895bde0db877ca4d5fe94c0d28e6 (patch)
treedf75ae3282cda08eec43aa564ddf032e081914ec /net/clientnb.cpp
parentd345c29a477bf7edd98b7b884aaacc4c06b82869 (diff)
Suppress assert()'s in the production builds.
Change-Id: I2074ed335b7201337e6519440ff6bed1809be915
Diffstat (limited to 'net/clientnb.cpp')
-rw-r--r--net/clientnb.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/net/clientnb.cpp b/net/clientnb.cpp
index 311491e6b..d7b75e211 100644
--- a/net/clientnb.cpp
+++ b/net/clientnb.cpp
@@ -144,7 +144,10 @@ struct ThreadWorker : public Runnable
{
Session ping(_domain ? _domain : "init", EnableHttps);
ping.sendPing(i);
- int back = ping.getResponseInt();
+#ifndef NDEBUG
+ int back =
+#endif
+ ping.getResponseInt();
assert(back == i + 1);
}
}
@@ -209,7 +212,10 @@ struct Client : public Poco::Util::Application
ws->sendFrame(&i, sizeof(i), WebSocket::SendFlags::FRAME_BINARY);
size_t back[5];
int flags = 0;
- int recvd = ws->receiveFrame((void *)back, sizeof(back), flags);
+#ifndef NDEBUG
+ int recvd =
+#endif
+ ws->receiveFrame((void *)back, sizeof(back), flags);
assert(recvd == sizeof(size_t));
assert(back[0] == i + 1);
}
@@ -233,7 +239,10 @@ struct Client : public Poco::Util::Application
res.resize(i);
int flags;
- int recvd = ws->receiveFrame(res.data(), res.size(), flags);
+#ifndef NDEBUG
+ int recvd =
+#endif
+ ws->receiveFrame(res.data(), res.size(), flags);
assert(recvd == static_cast<int>(i));
if (i == sizeof(size_t))