Subject: Re: [libssh2] compilation in HP-UX

Re: [libssh2] compilation in HP-UX

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 19 Jul 2007 17:01:56 +0200 (CEST)

On Thu, 19 Jul 2007, roberto pulvirenti wrote:

> Warning 942: "session.c", line 442 # Types 'void *' and 'void
> (*)(_LIBSSH2_SESSION *,const char
> *,int,void **)' are not assignment-compatible.
> oldcb = session->ssh_msg_ignore;
> ^^^^^^^^^^^^^^^^^^^^^^^

While not errors, these are bad assignments that we should fix...

> Error 176: "session.c", line 1134 # Size of array must be an integral
> constant expression of value
> greater than 0.
> struct pollfd sockets[nfds];
> ^^^^

Oh right, this is a C99'ism that we must fix in the code. I believe I added a
comment in the code around that since the fix isn't obvious as we don't have
the 'session' pointer in that function and thus cannot access the malloc
function pointer.

I think we should add an argument to the function prototype, alternatively
use plain malloc() (ignoring the possibly "custom" malloc function).

Another work-around for you (besides setting a larger fixed number) would be
to install gcc or similar C99 aware compiler, and build libssh2 with that.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2007-07-19