diff --git a/CMakeLists.txt b/CMakeLists.txt index 4173381ac..7e286bff2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,7 +58,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_C_STANDARD 11) set(CMAKE_C_EXTENSIONS OFF) -if(NOT MSVC) +if(MSVC) + add_compile_options("/W3") +else() add_compile_options( -Wall -Wextra -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wbad-function-cast -Wnested-externs diff --git a/src/pcp/request.c b/src/pcp/request.c index 182ed926c..730234540 100644 --- a/src/pcp/request.c +++ b/src/pcp/request.c @@ -150,7 +150,7 @@ static void timeout(void *arg) } req->RT = RT_next(&req->conf, req->RT); - tmr_start(&req->tmr, req->RT * 1000, timeout, req); + tmr_start(&req->tmr, (uint64_t)req->RT * 1000, timeout, req); } @@ -238,7 +238,7 @@ static int start_sending(struct pcp_request *req) return err; req->RT = RT_init(&req->conf); - tmr_start(&req->tmr, req->RT * 1000, timeout, req); + tmr_start(&req->tmr, (uint64_t)req->RT * 1000, timeout, req); if (req->conf.mrd) { tmr_start(&req->tmr_dur, req->conf.mrd * 1000,