Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

Commit

Permalink
warning removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Eisner authored and deisner committed Jul 20, 2015
1 parent c44f767 commit b9f27f7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/dyad.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

#ifdef _WIN32
#define _WIN32_WINNT 0x501
#define _CRT_SECURE_NO_WARNINGS
#ifndef _CRT_SECURE_NO_WARNINGS
#define _CRT_SECURE_NO_WARNINGS
#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#include <windows.h>
Expand Down Expand Up @@ -700,8 +702,17 @@ void dyad_update(void) {
}

/* Init timeout value and do select */
#ifdef _WIN32
#pragma warning(push)
/* Disable double to long implicit conversion warning,
* because the type of timeval's fields don't agree across platforms */
#pragma warning(disable: 4244)
#endif
tv.tv_sec = dyad_updateTimeout;
tv.tv_usec = (dyad_updateTimeout - tv.tv_sec) * 1e6;
#ifdef _WIN32
#pragma warning(pop)
#endif

select(dyad_selectSet.maxfd + 1,
dyad_selectSet.fds[SELECT_READ],
Expand Down

0 comments on commit b9f27f7

Please sign in to comment.