From 9b0e7fabc5ba47c0eaa50346cf732af57a5e470d Mon Sep 17 00:00:00 2001 From: Victor Zarubkin Date: Sun, 13 Nov 2016 15:20:25 +0300 Subject: [PATCH] g++ warnings fix --- profiler_gui/main_window.cpp | 2 +- src/easy_socket.cpp | 1 + src/profile_manager.cpp | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/profiler_gui/main_window.cpp b/profiler_gui/main_window.cpp index dd2f5df..11d934a 100644 --- a/profiler_gui/main_window.cpp +++ b/profiler_gui/main_window.cpp @@ -1352,7 +1352,7 @@ bool EasySocketListener::connect(const char* _ipaddress, uint16_t _port, profile return isConnected; } - int seek = bytes; + size_t seek = bytes; while (seek < sizeof(profiler::net::EasyProfilerStatus)) { bytes = m_easySocket.receive(buffer + seek, buffer_size - seek); diff --git a/src/easy_socket.cpp b/src/easy_socket.cpp index d7cb56f..7a7b119 100644 --- a/src/easy_socket.cpp +++ b/src/easy_socket.cpp @@ -42,6 +42,7 @@ int EasySocket::_close(EasySocket::socket_t s) #else //TODO //return close(s); + return 0; #endif } diff --git a/src/profile_manager.cpp b/src/profile_manager.cpp index 7553946..545ed3d 100644 --- a/src/profile_manager.cpp +++ b/src/profile_manager.cpp @@ -982,7 +982,9 @@ void ProfileManager::listen() case profiler::net::MESSAGE_TYPE_EVENT_TRACING_PRIORITY: { +#if defined(_WIN32) || defined(EASY_DEBUG_NET_PRINT) auto data = reinterpret_cast(message); +#endif #ifdef EASY_DEBUG_NET_PRINT printf("receive EVENT_TRACING_PRIORITY low=%d\n", data->flag ? 1 : 0);