X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fopenldap.c;h=bd79b26b7312bf076c95a247f9d3331688e5f550;hb=bc5073cf25c5cea3a322f70a3a9ba50c67460638;hp=e68884996776780aa5d4e0ea4a3b76a37d39082d;hpb=0b68a27050ffbe8ce115d644fc572860b51b3707;p=collectd.git diff --git a/src/openldap.c b/src/openldap.c index e6888499..bd79b26b 100644 --- a/src/openldap.c +++ b/src/openldap.c @@ -31,6 +31,11 @@ #include "plugin.h" #include "configfile.h" +#if defined(__APPLE__) +#pragma clang diagnostic push +#pragma clang diagnostic warning "-Wdeprecated-declarations" +#endif + #include #include @@ -604,7 +609,8 @@ static int cldap_config_add (oconfig_item_t *ci) /* {{{ */ st->name, st->url); status = -1; } - else if (ludpp->lud_host != NULL) + + if ((status == 0) && (ludpp->lud_host != NULL)) { st->host = strdup (ludpp->lud_host); } @@ -680,3 +686,7 @@ void module_register (void) /* {{{ */ plugin_register_complex_config ("openldap", cldap_config); plugin_register_init ("openldap", cldap_init); } /* }}} void module_register */ + +#if defined(__APPLE__) +#pragma clang diagnostic pop +#endif