[collectd] Re : Build collectd-5.0.2 on AIX 5.3 wich gcc 4.6 => email.c:379:1: error: no return statement in function returning non-void [-Werror=return-type]
phoebus phoebus
frphoebus at yahoo.fr
Tue Feb 21 09:46:23 CET 2012
Hi Florian,
Thanks very much for your update.
I follow your advise and progress .
Below the diff's AIX output concerning change in email.c.
XTO1: diff email.c email.c.orig
378,379c378
< /* pthread_exit ((void *)0); */ /* Comment */
< return ((void *)0);
---
> pthread_exit ((void *)0);
552,553c551
< /* pthread_exit ((void *)0); */ /* Comment */
< return ((void *)0);
---
> pthread_exit ((void *)0);
XTO1:
Regards,
Phoebus
----- Mail original -----
De : Florian Forster <octo at collectd.org>
À : phoebus phoebus <frphoebus at yahoo.fr>
Cc : "collectd at verplant.org" <collectd at verplant.org>
Envoyé le : Lundi 20 février 2012 21h38
Objet : Re: [collectd] Build collectd-5.0.2 on AIX 5.3 wich gcc 4.6 => email.c:379:1: error: no return statement in function returning non-void [-Werror=return-type]
Hi,
On Mon, Feb 20, 2012 at 04:55:51PM +0000, phoebus phoebus wrote:
> libtool: compile: /usr/bin/gcc -DHAVE_CONFIG_H -I. -DPREFIX=\"/home/tools/bertaud/collectd\" -DCONFIGFILE=\"/home/tools/bertaud/collectd/etc/collectd.conf\" -DLOCALSTATEDIR=\"/home/tools/bertaud/collectd/var\" -DPKGLOCALSTATEDIR=\"/home/tools/bertaud/collectd/var/lib/collectd\" -DPIDFILE=\"/home/tools/bertaud/collectd/var/run/collectd.pid\" -DPLUGINDIR=\"/home/tools/bertaud/collectd/lib/collectd\" -DPKGDATADIR=\"/home/tools/bertaud/collectd/share/collectd\" -Wall -Werror -g -O2 -MT email.lo -MD -MP -MF .deps/email.Tpo -c email.c -DPIC -o .libs/email.o
> email.c: In function 'collect':
> email.c:379:1: error: no return statement in function returning non-void [-Werror=return-type]
> email.c: In function 'open_connection':
> email.c:552:1: error: no return statement in function returning non-void [-Werror=return-type]
these are the main functions of threads. They end with pthread_exit()
which that version of GCC doesn't recognize as ending the thread of
execution and is thus complaining about a missing return statement.
I think if you replace "pthread_exit" in these functions with "return",
the compiler should be happy.
Best regards,
—octo
--
collectd – The system statistics collection daemon
Website: http://collectd.org
Google+: http://collectd.org/+
Github: https://github.com/collectd
Twitter: http://twitter.com/collectd
More information about the collectd
mailing list