From 10c8beab1f57f62ac8fa80d6c1990ebee0748a9e Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 8 Mar 2023 13:59:59 +0100 Subject: [PATCH] build: silence bogus C4127 warnings with MSVS 2013 and earlier (#819) E.g.: `channel.c(370): warning C4127: conditional expression is constant` Ref: https://ci.appveyor.com/project/libssh2org/libssh2/builds/46437333/job/5rak1vcl9hue31ei#L190 --- src/libssh2_priv.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/libssh2_priv.h b/src/libssh2_priv.h index 1274a661..387ff5d3 100644 --- a/src/libssh2_priv.h +++ b/src/libssh2_priv.h @@ -39,6 +39,11 @@ * OF SUCH DAMAGE. */ +/* Disable warnings: C4127: conditional expression is constant */ +#if defined(_MSC_VER) && _MSC_VER < 1900 +#pragma warning(disable:4127) +#endif + #define LIBSSH2_LIBRARY #include "libssh2_config.h"