0
0
mirror of https://github.com/yse/easy_profiler.git synced 2024-12-27 00:31:02 +08:00

Added the /WX flag, which treats compiler warnings as errors in MSVC.

* This required a minor change to CMakeLists.txt.
* Also updated two occurrences in code where compilation failed due to
implicit narrowing conversions.
This commit is contained in:
Liareth 2017-08-09 17:36:40 +01:00
parent a1aa8fc2e1
commit b0aae2349c
3 changed files with 6 additions and 2 deletions

View File

@ -131,6 +131,10 @@ if (MINGW)
target_compile_definitions(easy_profiler PRIVATE -DSTRSAFE_NO_DEPRECATE)
endif ()
if (MSVC)
target_compile_options(easy_profiler PRIVATE /WX)
endif()
if (APPLE)
target_compile_options(easy_profiler PUBLIC -std=gnu++11)
else ()

View File

@ -248,7 +248,7 @@ int EasySocket::accept()
fdexcl = fdread;
tv.tv_sec = 0; tv.tv_usec = 500;
int rc =select (m_socket+1, &fdread, &fdwrite, &fdexcl, &tv);
int rc =select ((int)m_socket+1, &fdread, &fdwrite, &fdexcl, &tv);
if(rc <= 0){
//there is no connection for accept

View File

@ -370,7 +370,7 @@ namespace profiler {
other.m_size = m_size;
m_data = d;
m_size = sz;
m_size = (size_t)sz;
}
private: