From: Sebastian Harl Date: Mon, 28 Apr 2008 14:53:57 +0000 (+0200) Subject: perl plugin: Work around a compiler warning on FreeBSD. X-Git-Tag: collectd-4.4.0~4^2~2^2~3 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=3693eefca257fe28e4b363ecfd39a44571f180ac;p=collectd.git perl plugin: Work around a compiler warning on FreeBSD. On FreeBSD, PERL_SYS_INIT3 expands to some expression which triggers a "value computed is not used" warning by gcc. By telling the compiler to ignore this value, we can work around this issue. In the long run, this should imho be fixed in Perl though. Signed-off-by: Sebastian Harl Signed-off-by: Florian Forster --- diff --git a/src/perl.c b/src/perl.c index 02837578..68d6ddcf 100644 --- a/src/perl.c +++ b/src/perl.c @@ -817,6 +817,11 @@ static int init_pi (int argc, char **argv) } #endif /* COLLECT_DEBUG */ +#ifdef __FreeBSD__ + /* On FreeBSD, PERL_SYS_INIT3 expands to some expression which + * triggers a "value computed is not used" warning by gcc. */ + (void) +#endif PERL_SYS_INIT3 (&argc, &argv, &environ); if (NULL == (perl = perl_alloc ())) {