Fix warnings.
Reviewers: buda, mferencevic Reviewed By: buda Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D110
This commit is contained in:
parent
333861e7e9
commit
4a220411e1
@ -23,7 +23,7 @@ uint32_t fnv32(const T& data) {
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t fnv32(const std::string& data) {
|
||||
__attribute__((unused)) uint32_t fnv32(const std::string& data) {
|
||||
return fnv32((const unsigned char*)data.c_str(), data.size());
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ uint32_t fnv1a32(const T& data) {
|
||||
}
|
||||
|
||||
template <>
|
||||
uint32_t fnv1a32(const std::string& data) {
|
||||
__attribute__((unused)) uint32_t fnv1a32(const std::string& data) {
|
||||
return fnv1a32((const unsigned char*)data.c_str(), data.size());
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ uint64_t fnv64(const T& data) {
|
||||
}
|
||||
|
||||
template <>
|
||||
uint64_t fnv64(const std::string& data) {
|
||||
__attribute__((unused)) uint64_t fnv64(const std::string& data) {
|
||||
return fnv64((const unsigned char*)data.c_str(), data.size());
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ uint64_t fnv1a64(const T& data) {
|
||||
}
|
||||
|
||||
template <>
|
||||
uint64_t fnv1a64(const std::string& data) {
|
||||
__attribute__((unused)) uint64_t fnv1a64(const std::string& data) {
|
||||
return fnv1a64((const unsigned char*)data.c_str(), data.size());
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
#ifndef NDEBUG
|
||||
#define NDEBUG
|
||||
#endif
|
||||
|
||||
#include "network_common.hpp"
|
||||
|
||||
@ -33,7 +35,8 @@ TEST(Network, Server) {
|
||||
// start clients
|
||||
std::vector<std::thread> clients;
|
||||
for (int i = 0; i < N; ++i)
|
||||
clients.push_back(std::thread(client_run, i, interface, port, data, 30000, SIZE));
|
||||
clients.push_back(
|
||||
std::thread(client_run, i, interface, port, data, 30000, SIZE));
|
||||
|
||||
// cleanup clients
|
||||
for (int i = 0; i < N; ++i) clients[i].join();
|
||||
|
@ -1,4 +1,6 @@
|
||||
#ifndef NDEBUG
|
||||
#define NDEBUG
|
||||
#endif
|
||||
|
||||
#include <chrono>
|
||||
|
||||
@ -39,7 +41,8 @@ TEST(Network, SessionLeak) {
|
||||
|
||||
int testlen = 3000;
|
||||
for (int i = 0; i < N; ++i) {
|
||||
clients.push_back(std::thread(client_run, i, interface, port, data, testlen, testlen));
|
||||
clients.push_back(
|
||||
std::thread(client_run, i, interface, port, data, testlen, testlen));
|
||||
std::this_thread::sleep_for(10ms);
|
||||
}
|
||||
|
||||
@ -53,7 +56,8 @@ TEST(Network, SessionLeak) {
|
||||
server_thread.join();
|
||||
}
|
||||
|
||||
// run with "valgrind --leak-check=full ./network_session_leak" to check for memory leaks
|
||||
// run with "valgrind --leak-check=full ./network_session_leak" to check for
|
||||
// memory leaks
|
||||
int main(int argc, char **argv) {
|
||||
logging::init_sync();
|
||||
logging::log->pipe(std::make_unique<Stdout>());
|
||||
|
Loading…
Reference in New Issue
Block a user