[gnutls-devel] Compilation error with gnutls src/common.c

David Marx David.M.Marx at Oracle.Com
Sun Feb 1 07:06:16 CET 2015

I get the following compilation error when trying to compile gnutls 3.3
with the Solarisstudio12.3 compiler.
   CC       common.o
line 625:
void function cannot return value
The function print_cert_info returns void, and the function 
print_cert_info2 returns void.
I think gcc allows return of a void as an extension, but it seems our 
compiler doesn't.
The top of the gnutls tree appears to be the same code.  I suggest the 
following patch.


Scapen-Csx12-0[63]% cat voidreturn.patch
--- gnutls-3.3.12/src/common.c    Sat Jan  3 09:59:47 2015
+++ gnutls-3.3.12/src/common.c    Sat Jan 31 21:05:53 2015
@@ -622,7 +622,7 @@

  void print_cert_info(gnutls_session_t session, int verbose, int 
-       return print_cert_info2(session, verbose, stdout, print_cert);
+       print_cert_info2(session, verbose, stdout, print_cert);

  void print_cert_info2(gnutls_session_t session, int verbose, FILE 
*out, int print_cert)

More information about the Gnutls-devel mailing list