1
0
mirror of https://github.com/libssh2/libssh2.git synced 2026-10-24 03:48:58 +03:00
Files
libssh2/include
Viktor Szakats 04ecdb22fe build: update picky warning options, fix fallouts
- sync picky compiler warning options with curl:
  - update version mappings for latest Apple clang.
  - replace `-pedantic` with `-Wpedantic` on newer toolchains.
  - adjust warning cutoff versions.
  - enable new picky warnings.
  - unlock picky warnings for most recent MSVC.
- GHA: bump some MSVC jobs to to VS2026.

Fix fallouts:
- configure: replace `-I` with `-isystem` for dependency headers.
  Notably it silences picky warnings otherwise found in 3rd-party
  headers, e.g. `-Wreserved-identifier` in `gpg-error.h`,
  `openssl/lhash.h`, `wolfssl/wolfcrypt/hmac.h`, or
  `-Wcast-function-type-strict` in `openssl/rsa.h`.
  It also aligns autotools builds with CMake (and curl builds).
  Logic copied from curl.
- example/x11: fix to not use reserved symbols.
- include, src/libssh2_priv.h: silence `-Wreserved-identifier` locally.
  May be fixed for real in a future patch.
- avoid using reserved C++ keyword `public`.
- openssl: silence `-Wcast-function-type-strict` locally for
  non-OpenSSL3 builds.
- mbedtls, openssl: fix potentially uninitialized variable warnings.
  (extend to all compilers from MSVC in openssl)
- fix `LIBSSH2_SOCKET_MASK` signedness on Windows.
- wincng: apply casts from `int` to `enum` to silence
  `-Wimplicit-int-enum-cast`.
- configure: disable `-Wleading-whitespace=spaces` to due
  incompatibility with `AC_FUNC_ALLOCA`.
- packet: fix to pass `int` as mask length.
- fix `-Wformat-signedness`.
- src/libssh2_priv.h: silence `-Wreserved-macro-identifier` locally for
  mingw-w64 builds.
- GHA: add workaround for missing NSIS on windows-2025 runner images.

Closes #1972
2026-06-07 15:19:19 +02:00
..