[gnutls-help] gnutls-3.2.13 : another code bug "base64.c", line 99: error: void function cannot return value
dev at cor0.com
Wed Apr 30 18:50:36 CEST 2014
On April 30, 2014 at 4:06 AM Nikos Mavrogiannopoulos <nmav at gnutls.org>
> On Wed, Apr 30, 2014 at 12:24 AM, dev <dev at cor0.com> wrote:
> > I just checked and sure enough the code is trying to
> > return a value from a static void function :
> > That right there is just plain wrong.
> > How can you return a value from a void function ?
> I believe that comes from c++, no idea if it is in the c99 standard,
> but work with gcc and clang.
> > Does this stuff compile with GCC and it seems to work ?
> Apparently yes. I'll modify the code to keep your compiler happy as
patch? What is your change ? Are you actually doing a "return" or
just an exit here or what was the intention? A return(0) perhaps?
The problem is not "my compiler" but "the code" wherein there are
for void functions. That is just wrong on all compilers. The fact that
this somehow slides past GCC makes me question GCC even more.
Perhaps now is a good time to try some pedantic flags on GCC and find
possibly hidden bugs that may be all over the place and you just
are not seeing them. Better yet, some test platforms are needed on some
OS's like Solaris, AIX, HPUX, OpenBSD perhaps.
Regardless, getting this gnuTLS code to compile on a commercial UNIX
Solaris is a major incredible pain.
More information about the Gnutls-help