1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-07-29 13:01:14 +03:00

ci: add MSVS 2008/2010 build tests and fix warnings

Also:

- fix newly surfaced (bogus) warnings in examples with MSVS 2010:

  ```
  ..\..\example\direct_tcpip.c(262): warning C4127: conditional expression is constant
  ```
  Happens for every `FD_SET()` macro reference.

  Ref: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46677835/job/ni4hs97bh18c14ap

- silence MSVS 2010 predefined Windows macro warnings:

  ```
  ..\..\src\wincng.c(867): warning C4306: 'type cast' : conversion from 'int' to 'LPCSTR' of greater size
  ..\..\src\wincng.c(897): warning C4306: 'type cast' : conversion from 'int' to 'LPCSTR' of greater size
  ..\..\src\wincng.c(1132): warning C4306: 'type cast' : conversion from 'int' to 'LPCSTR' of greater size
  ```

  Ref: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46678071/job/08t5ktvkcgdghp7r

Closes #925
This commit is contained in:
Viktor Szakats
2023-04-03 12:08:50 +00:00
parent d1b36efe41
commit 2e3e0be816
12 changed files with 72 additions and 4 deletions

View File

@ -51,6 +51,10 @@
#include <stdio.h>
#include <ctype.h>
#if defined(_MSC_VER) && _MSC_VER < 1700
#pragma warning(disable:4127)
#endif
static int waitsocket(libssh2_socket_t socket_fd, LIBSSH2_SESSION *session)
{
struct timeval timeout;