[gnutls-help] "certtool-cfg.c", line 1022: error: void function cannot return value

dev dev at cor0.com
Thu May 1 07:13:18 CEST 2014


I apologize .. but I have a nearly perfectly clean compile here with
Oracle Studio 12.3 compiler and I am using c99 and -Xc pedantic and
strict compliance mode.

So, here is another of those little nits :


  CC       certtool-cfg.lo
"certtool-cfg.c", line 1022: error: void function cannot return value
"certtool-cfg.c", line 1133: error: void function cannot return value
c99: acomp failed for certtool-cfg.c
gmake[4]: *** [certtool-cfg.lo] Error 1
gmake[4]: Leaving directory
`/usr/local/build/gnutls-3.3.1_SunOS5.10_sparcv9_002/src'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory
`/usr/local/build/gnutls-3.3.1_SunOS5.10_sparcv9_002/src'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory
`/usr/local/build/gnutls-3.3.1_SunOS5.10_sparcv9_002/src'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory
`/usr/local/build/gnutls-3.3.1_SunOS5.10_sparcv9_002'
gmake: *** [all] Error 2

node002$ diff -u src/certtool-cfg.c_backup src/certtool-cfg.c
--- src/certtool-cfg.c_backup   Wed Apr 16 16:52:40 2014
+++ src/certtool-cfg.c  Thu May  1 05:02:07 2014
@@ -1019,7 +1019,7 @@

 void get_serial(unsigned char* serial, size_t * size)
 {
-       return get_rand_int_value(serial, size, cfg.serial, "Enter the
certificate's serial number in decimal");
+       get_rand_int_value(serial, size, cfg.serial, "Enter the
certificate's serial number in decimal");
 }

 static
@@ -1130,7 +1130,7 @@

 void get_crl_number(unsigned char* serial, size_t * size)
 {
-       return get_rand_int_value(serial, size, cfg.crl_number, "CRL
Number");
+       get_rand_int_value(serial, size, cfg.crl_number, "CRL Number");
 }

 int get_path_len(void)


That fixes that one.

With -Xc and all warnings and using the C99 compiler I am seeing all
manner
of little things, such as :

  CC       cli-debug.o
"cli-debug.c", line 86: warning: dubious escape: \%


So I will just keep doing what I am doing here. Mostly cosmetic and
without
doing any damage.  I switched over to using c99 because of the oddity
with
stdbool.h which requires the define symbol _STDC_C99.  So I switched
over
to using CC=/opt/solarisstudio12.3/bin/c99 as well as obscenely
stringent
CFLAGS and at the moment everything compiles and the manpages are being
created.

The real test here will be the test suite. No pun intended.

Dennis

ps: I do have a set of patches. All minor. However I will wait until I
see
    the testsuite run.



More information about the Gnutls-help mailing list