[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]

Florian Forster octo at collectd.org
Mon Feb 20 21:38:03 CET 2012


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.verplant.org/pipermail/collectd/attachments/20120220/d31ad9b2/attachment.pgp>


More information about the collectd mailing list