Commit 05ecdc21015365f7bb828de8cdc0459485d17595

Authored by Stéphane Raimbault
1 parent 9da1b6ad

GetLastError() returns a DWORD so it's an unsigned int. Fixes #9.

The error reported by #9 was already fixed in master but this change
scrupulously respects the definition of DWORD.
Showing 1 changed file with 1 additions and 1 deletions
src/modbus-tcp.c
... ... @@ -69,7 +69,7 @@ static int _modbus_tcp_init_win32(void)
69 69  
70 70 if (WSAStartup(MAKEWORD(2, 0), &wsaData) != 0) {
71 71 fprintf(stderr, "WSAStartup() returned error code %d\n",
72   - (int)GetLastError());
  72 + (unsigned int)GetLastError());
73 73 errno = EIO;
74 74 return -1;
75 75 }
... ...