#include <EXTERN.h>
#include <perl.h>
-#if __GNUC__
+#if defined(COLLECT_DEBUG) && COLLECT_DEBUG && defined(__GNUC__) && __GNUC__
# pragma GCC poison sprintf
#endif
XSRETURN_EMPTY;
}
- plugin_log (SvIV (ST (0)), SvPV_nolen (ST (1)));
+ plugin_log (SvIV (ST (0)), "%s", SvPV_nolen (ST (1)));
XSRETURN_YES;
} /* static XS (Collectd_plugin_log) */
PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
if (0 != perl_parse (aTHX_ xs_init, argc, argv, NULL)) {
- log_err ("init_pi: Unable to bootstrap Collectd.");
+ SV *err = get_sv ("@", 1);
+ log_err ("init_pi: Unable to bootstrap Collectd: %s",
+ SvPV_nolen (err));
perl_destruct (perl_threads->head->interp);
perl_free (perl_threads->head->interp);
for (i = 0; i < ci->children_num; ++i) {
oconfig_item_t *c = ci->children + i;
- int current_status;
+ int current_status = 0;
if (NULL != perl_threads)
aTHX = PERL_GET_CONTEXT;