Subject: Re: libssh2 master 3420e98... use const to silence a bazillion warnings

Re: libssh2 master 3420e98... use const to silence a bazillion warnings

From: Simon Josefsson <simon_at_josefsson.org>
Date: Wed, 03 Mar 2010 10:02:08 +0100

Daniel Stenberg <daniel_at_haxx.se> writes:

>> Do we ever actually call libssh2_error with a string we want freed?
>> I've not come across any but its tricky to search for.
>
> I did a search for it and I find two or three cases. I'm not at all
> convinced those rare cases are worth fighting for. Or perhaps I would
> even prefer having a static char array and then allow sprintf()-style
> arguments to make the error message. It would then of course be
> limited to a fixed length, like 80 or 120 characters or so.
>
> How would others feel about that?

Are those 2-3 cases really that important to motive this work? I prefer
to avoid dynamic error messages.

In my experience dynamic error messages tend to be mostly useful to
developers, and they can use debuggers to find out what the problem is.
Normal users are not helped significantly by having some more details
from libssh2, it is typically beyond what they can fix anyway.

/Simon
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-03-03