We only need a debug channel when we're later using it - and all uses in these files are guarded by #ifdef HAVE_LDAP, so use the same guard around the definition of the debug channel as well.
Thanks to Nikolay for this hint based on an earlier patch, and Alexandre for encouraging to go for the whole set of files.
Signed-off-by: Gerald Pfeifer gerald@pfeifer.com --- dlls/wldap32/add.c | 2 +- dlls/wldap32/bind.c | 2 ++ dlls/wldap32/compare.c | 2 ++ dlls/wldap32/control.c | 2 ++ dlls/wldap32/delete.c | 2 ++ dlls/wldap32/dn.c | 2 ++ dlls/wldap32/modify.c | 2 +- dlls/wldap32/modrdn.c | 2 ++ dlls/wldap32/option.c | 2 ++ dlls/wldap32/parse.c | 2 ++ dlls/wldap32/rename.c | 2 ++ dlls/wldap32/search.c | 2 ++ 12 files changed, 22 insertions(+), 2 deletions(-)
diff --git a/dlls/wldap32/add.c b/dlls/wldap32/add.c index 0a24d95f32..270311e561 100644 --- a/dlls/wldap32/add.c +++ b/dlls/wldap32/add.c @@ -34,9 +34,9 @@ #include "wldap32.h" #include "wine/debug.h"
+#ifdef HAVE_LDAP WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
-#ifdef HAVE_LDAP static LDAPMod *nullattrs[] = { NULL }; #endif
diff --git a/dlls/wldap32/bind.c b/dlls/wldap32/bind.c index 0e9404ec50..27fb286f50 100644 --- a/dlls/wldap32/bind.c +++ b/dlls/wldap32/bind.c @@ -34,7 +34,9 @@ #include "wldap32.h" #include "wine/debug.h"
+#ifdef HAVE_LDAP WINE_DEFAULT_DEBUG_CHANNEL(wldap32); +#endif
/*********************************************************************** * ldap_bindA (WLDAP32.@) diff --git a/dlls/wldap32/compare.c b/dlls/wldap32/compare.c index 7cadc2a970..a7eab26d96 100644 --- a/dlls/wldap32/compare.c +++ b/dlls/wldap32/compare.c @@ -34,7 +34,9 @@ #include "wldap32.h" #include "wine/debug.h"
+#ifdef HAVE_LDAP WINE_DEFAULT_DEBUG_CHANNEL(wldap32); +#endif
/*********************************************************************** * ldap_compareA (WLDAP32.@) diff --git a/dlls/wldap32/control.c b/dlls/wldap32/control.c index 1ec8641847..ffbf41ef68 100644 --- a/dlls/wldap32/control.c +++ b/dlls/wldap32/control.c @@ -34,7 +34,9 @@ #include "wldap32.h" #include "wine/debug.h"
+#ifdef HAVE_LDAP WINE_DEFAULT_DEBUG_CHANNEL(wldap32); +#endif
/*********************************************************************** * ldap_control_freeA (WLDAP32.@) diff --git a/dlls/wldap32/delete.c b/dlls/wldap32/delete.c index 47e1cb4f2c..7d62edc8ac 100644 --- a/dlls/wldap32/delete.c +++ b/dlls/wldap32/delete.c @@ -34,7 +34,9 @@ #include "wldap32.h" #include "wine/debug.h"
+#ifdef HAVE_LDAP WINE_DEFAULT_DEBUG_CHANNEL(wldap32); +#endif
/*********************************************************************** * ldap_deleteA (WLDAP32.@) diff --git a/dlls/wldap32/dn.c b/dlls/wldap32/dn.c index fbe1a0c091..1303eb5057 100644 --- a/dlls/wldap32/dn.c +++ b/dlls/wldap32/dn.c @@ -34,7 +34,9 @@ #include "wldap32.h" #include "wine/debug.h"
+#ifdef HAVE_LDAP WINE_DEFAULT_DEBUG_CHANNEL(wldap32); +#endif
/*********************************************************************** * ldap_dn2ufnA (WLDAP32.@) diff --git a/dlls/wldap32/modify.c b/dlls/wldap32/modify.c index 292fa831a8..defc32af9c 100644 --- a/dlls/wldap32/modify.c +++ b/dlls/wldap32/modify.c @@ -34,9 +34,9 @@ #include "wldap32.h" #include "wine/debug.h"
+#ifdef HAVE_LDAP WINE_DEFAULT_DEBUG_CHANNEL(wldap32);
-#ifdef HAVE_LDAP static LDAPMod *nullmods[] = { NULL }; #endif
diff --git a/dlls/wldap32/modrdn.c b/dlls/wldap32/modrdn.c index 3e2c867956..97ab0a9258 100644 --- a/dlls/wldap32/modrdn.c +++ b/dlls/wldap32/modrdn.c @@ -34,7 +34,9 @@ #include "wldap32.h" #include "wine/debug.h"
+#ifdef HAVE_LDAP WINE_DEFAULT_DEBUG_CHANNEL(wldap32); +#endif
/*********************************************************************** * ldap_modrdnA (WLDAP32.@) diff --git a/dlls/wldap32/option.c b/dlls/wldap32/option.c index ddc5ca4933..4b7ec36c38 100644 --- a/dlls/wldap32/option.c +++ b/dlls/wldap32/option.c @@ -34,7 +34,9 @@ #include "wldap32.h" #include "wine/debug.h"
+#ifdef HAVE_LDAP WINE_DEFAULT_DEBUG_CHANNEL(wldap32); +#endif
/*********************************************************************** * ldap_get_optionA (WLDAP32.@) diff --git a/dlls/wldap32/parse.c b/dlls/wldap32/parse.c index e83e6d2351..88464a3b13 100644 --- a/dlls/wldap32/parse.c +++ b/dlls/wldap32/parse.c @@ -34,7 +34,9 @@ #include "wldap32.h" #include "wine/debug.h"
+#ifdef HAVE_LDAP WINE_DEFAULT_DEBUG_CHANNEL(wldap32); +#endif
/*********************************************************************** * ldap_parse_extended_resultA (WLDAP32.@) diff --git a/dlls/wldap32/rename.c b/dlls/wldap32/rename.c index 2de50818b7..f8cac439a9 100644 --- a/dlls/wldap32/rename.c +++ b/dlls/wldap32/rename.c @@ -34,7 +34,9 @@ #include "wldap32.h" #include "wine/debug.h"
+#ifdef HAVE_LDAP WINE_DEFAULT_DEBUG_CHANNEL(wldap32); +#endif
/*********************************************************************** * ldap_rename_extA (WLDAP32.@) diff --git a/dlls/wldap32/search.c b/dlls/wldap32/search.c index 7e774f6894..f3d3eb48d4 100644 --- a/dlls/wldap32/search.c +++ b/dlls/wldap32/search.c @@ -34,7 +34,9 @@ #include "wldap32.h" #include "wine/debug.h"
+#ifdef HAVE_LDAP WINE_DEFAULT_DEBUG_CHANNEL(wldap32); +#endif
/*********************************************************************** * ldap_searchA (WLDAP32.@)