Repository navigation
Conversation
vszakats
marked this pull request as draft
June 4, 2026 18:22
vszakats
force-pushed
the
warnsup
branch
3 times, most recently
from
June 4, 2026 22:12
9e60df9 to
fd879ff
Compare
vszakats
marked this pull request as ready for review
June 5, 2026 03:54
vszakats
force-pushed
the
warnsup
branch
4 times, most recently
from
June 6, 2026 19:39
662a2ae to
ea05f25
Compare
```
../../src/wincng.c:1905:28: error: implicit conversion from 'unsigned int' to enumeration type 'ssh2_curve_type' is invalid in C++ [-Werror,-Wimplicit-int-enum-cast]
1905 | point->curve = curve;
| ~ ^~~~~
../../src/wincng.c:2501:26: error: implicit conversion from 'unsigned int' to enumeration type 'ssh2_curve_type' is invalid in C++ [-Werror,-Wimplicit-int-enum-cast]
2501 | *out_curve = curve;
| ~ ^~~~~
```
https://github.com/libssh2/libssh2/actions/runs/26973976594/job/79596136811?pr=1972
… and autoconf
```
In file included from ../../src/libssh2_setup.h:21,
from ../../src/libssh2_priv.h:56,
from ../../src/bcrypt_pbkdf.c:20:
../src/libssh2_config.h:190:8: error: whitespace other than spaces in leading whitespace [-Werror=leading-whitespace=]
190 | STACK_DIRECTION > 0 => grows toward higher addresses
../src/libssh2_config.h:191:8: error: whitespace other than spaces in leading whitespace [-Werror=leading-whitespace=]
191 | STACK_DIRECTION < 0 => grows toward lower addresses
../src/libssh2_config.h:192:8: error: whitespace other than spaces in leading whitespace [-Werror=leading-whitespace=]
192 | STACK_DIRECTION = 0 => direction of growth unknown */
In file included from ../../src/libssh2_setup.h:21,
from ../../src/libssh2_priv.h:56,
from ../../src/channel.c:42:
../src/libssh2_config.h:190:8: error: whitespace other than spaces in leading whitespace [-Werror=leading-whitespace=]
190 | STACK_DIRECTION > 0 => grows toward higher addresses
../src/libssh2_config.h:191:8: error: whitespace other than spaces in leading whitespace [-Werror=leading-whitespace=]
191 | STACK_DIRECTION < 0 => grows toward lower addresses
../src/libssh2_config.h:192:8: error: whitespace other than spaces in leading whitespace [-Werror=leading-whitespace=]
192 | STACK_DIRECTION = 0 => direction of growth unknown */
In file included from ../../src/libssh2_setup.h:21,
from ../../src/libssh2_priv.h:56,
from ../../src/agent.c:42:
```
https://github.com/libssh2/libssh2/actions/runs/26981291885/job/79620874898?pr=1972
libssh2_config.h (see tabs):
```
/* Define to the version of this package. */
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at runtime.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if all of the C89 standard headers exist (not just the ones
required in a freestanding environment). This macro is provided for
backward compatibility; new code need not use it. */
```
This reverts commit 23582343112c61a42b653a5f1c9ee746e3d292ca.
``` D:\a\libssh2\libssh2\src\channel.c(1356,1): error C2220: the following warning is treated as an error [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\channel.c(1356,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(373,1): error C2220: the following warning is treated as an error [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\channel.c(1356,1): error C2220: the following warning is treated as an error [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(373,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\channel.c(1356,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1080,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(373,1): error C2220: the following warning is treated as an error [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1083,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(373,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1086,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1080,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1089,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1083,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1102,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1086,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1105,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1089,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1108,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1102,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1111,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1105,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\misc.c(89,1): error C2220: the following warning is treated as an error [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1108,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\misc.c(89,1): warning C4710: 'fprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\knownhost.c(1111,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\misc.c(89,1): error C2220: the following warning is treated as an error [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\misc.c(89,1): warning C4710: 'fprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\packet.c(1282,1): error C2220: the following warning is treated as an error [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\packet.c(1282,1): error C2220: the following warning is treated as an error [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\packet.c(1282,1): warning C4710: 'packet_queue_listener': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\packet.c(1282,1): warning C4710: 'packet_queue_listener': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\packet.c(1295,1): warning C4710: 'packet_x11_open': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\packet.c(1295,1): warning C4710: 'packet_x11_open': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\packet.c(1310,1): warning C4710: 'packet_authagent_open': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\packet.c(1310,1): warning C4710: 'packet_authagent_open': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\scp.c(310,1): error C2220: the following warning is treated as an error [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\scp.c(310,1): error C2220: the following warning is treated as an error [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\scp.c(310,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\scp.c(310,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\scp.c(855,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\scp.c(855,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\scp.c(956,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\scp.c(956,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\scp.c(1026,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\scp.c(1026,1): warning C4710: 'snprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\session.c(714,1): error C2220: the following warning is treated as an error [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] D:\a\libssh2\libssh2\src\session.c(714,1): error C2220: the following warning is treated as an error [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\session.c(714,1): warning C4710: 'fprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_static.vcxproj] D:\a\libssh2\libssh2\src\session.c(714,1): warning C4710: 'fprintf': function not inlined [D:\a\libssh2\libssh2\bld\src\libssh2_shared.vcxproj] ```
looks like windows-2025 images no longer include NSIS, which may cause this: ``` [...] test_auth_pubkey_ok_ed25519_mem.vcxproj -> D:\a\libssh2\libssh2\bld\tests\Release\test_auth_pubkey_ok_ed25519_mem.exe test_auth_pubkey_ok_ecdsa.vcxproj -> D:\a\libssh2\libssh2\bld\tests\Release\test_auth_pubkey_ok_ecdsa.exe Building Custom Rule D:/a/libssh2/libssh2/CMakeLists.txt 1> EXEC : CPack error : Cannot find NSIS compiler makensis: likely it is not installed, or not in your PATH [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] EXEC : CPack error : Could not read NSIS registry value. This is usually caused by NSIS not being installed. Please install NSIS from http://nsis.sourceforge.net [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] EXEC : CPack error : Cannot initialize the generator NSIS [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: The command "setlocal [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: cd D:\a\libssh2\libssh2\bld [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: D: [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: "C:\Program Files\CMake\bin\cpack.exe" -C Release --config ./CPackConfig.cmake [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :cmEnd [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmEnd [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmErrorLevel [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: exit /b %1 [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: :cmDone [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: if %errorlevel% neq 0 goto :VCEnd [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] C:\Program Files\Microsoft Visual Studio\18\Enterprise\MSBuild\Microsoft\VC\v180\Microsoft.CppCommon.targets(166,5): error MSB3073: :VCEnd" exited with code 1. [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] Error: Process completed with exit code 1. ``` https://github.com/libssh2/libssh2/actions/runs/27092197028/job/79957682891?pr=1972 https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-Readme.md https://github.com/actions/runner-images/blob/main/images/windows/Windows2025-VS2026-Readme.md
previous solution worked, trying something less drastic hopefully
This reverts commit 8d7e43b. Not working: ``` EXEC : CPack error : CPack generator not specified [D:\a\libssh2\libssh2\bld\PACKAGE.vcxproj] ``` https://github.com/libssh2/libssh2/actions/runs/27092973593/job/79959882409
This was referenced Jun 7, 2026
vszakats
added a commit
that referenced
this pull request
Jun 7, 2026
Drop local worker functions, to avoid passing around function pointers, with a local typedef that needs to be different (and matching upstream exactly) dependening on crypto backend/version and key type. Also: - fix ed25519 callback function for non-OpenSSL3. (detected by MSVC after dropping casts.) - drop local compiler warning silencing. - tried to use local macros. It saved 30 lines of code, but I opted for the simplicity/clarity of duplicating the BIO calls around each call. Follow-up to 04ecdb2 #1972 Follow-up to 784446b #1484 Follow-up to b0ab005 #1207 Follow-up to 231a97a Closes #1991
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
-pedanticwith-Wpedanticon newer toolchains.Fix fallouts:
-Iwith-isystemfor dependency headers.Notably it silences picky warnings otherwise found in 3rd-party
headers, e.g.
-Wreserved-identifieringpg-error.h,openssl/lhash.h,wolfssl/wolfcrypt/hmac.h, or-Wcast-function-type-strictinopenssl/rsa.h.It also aligns autotools builds with CMake (and curl builds).
Logic copied from curl.
-Wreserved-identifierlocally.May be fixed for real in a future patch.
public.-Wcast-function-type-strictlocally fornon-OpenSSL3 builds.
(extend to all compilers from MSVC in openssl)
LIBSSH2_SOCKET_MASKsignedness on Windows.inttoenumto silence-Wimplicit-int-enum-cast.-Wleading-whitespace=spacesto dueincompatibility with
AC_FUNC_ALLOCA.intas mask length.-Wformat-signedness.-Wreserved-macro-identifierlocally formingw-w64 builds.
By renaming them. They are not officially documented symbols, but
may cause breakage if a dependent happens is using them. → separate PR, needs decision
There is real-life use: https://github.com/search?q=struct+_LIBSSH2_SESSION&type=code&p=3 https://codesearch.debian.net/search?q=_LIBSSH2_SESSION&literal=1
So pbly a renaming and keeping around compatibility macros.