Subject: Re: Patch to ticket 228

Re: Patch to ticket 228

From: Jernej Kovacic <>
Date: Wed, 23 Nov 2011 19:21:03 +0100

Finally I've managed to prepare a build environment on Windows with VS2005.
Slight modification of the LIBSSH2_FREE line (line 2000 in the current
revision) to:

LIBSSH2_FREE(session, (void*) *algs);

(in other words, *algs is casted to void*) eliminates the warning and
the file compiles fine both with VS2005 and with GCC.
I've written the section of code, where this line appears, to handle
all theoretically possible defects. Later it was mentioned that such
an event is very unlikely so there's a question whether this block
will remain in the code.....

I would like to prepare a patch but currently I am experimenting with
some other modifications of kex.c (not related to this feature) and I
have no idea if it is possible to include only certain modifications
of a file.

When building on Windows, I've noticed additional issues, not reported
with GCC and not related to my modifications.

- several compiler warnings "conversion from ... to ..." are reported.
Not with kex.c though.

- the file win32/libssh2.dsp (an equivalent to .vcproj in older
releases of visual C/Studio), referred by libssh2.dsw, has somehow
disappeared from the repository. It's still present in the 1.3.0
release, however. The same applies for INSTALL. Should I open a ticket
with this issue?

Regards, Jernej

On Mon, Nov 21, 2011 at 12:59 PM, Mark Smith
<> wrote:
> I've just compiled the snapshot from 20111121 and MSVC6 throws a compile
> warning on the LIBSSH2_FREE() call due to the const pointer; patch attached.
> PS: I don't have git, this is a plain diff -u
> --
> Mark Smith
Received on 2011-11-23