From: Grégory Oestreicher Date: Mon, 16 Apr 2018 19:39:25 +0000 (+0200) Subject: Remove compiler warnings pointed by Aki X-Git-Tag: dnsdist-1.3.1~143^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=54b307fcc8d2e8bf463c2952f09dd6631ab55608;p=pdns Remove compiler warnings pointed by Aki --- diff --git a/modules/ldapbackend/ldapbackend.hh b/modules/ldapbackend/ldapbackend.hh index 37828337f..7fe7df8a4 100644 --- a/modules/ldapbackend/ldapbackend.hh +++ b/modules/ldapbackend/ldapbackend.hh @@ -53,7 +53,7 @@ class LdapAuthenticator; * Types which aren't active are currently not supported by PDNS */ -static const char* ldap_attrany[] = { +__attribute__ ((unused)) static const char* ldap_attrany[] = { "associatedDomain", "dNSTTL", "ALIASRecord", diff --git a/modules/ldapbackend/powerldap.cc b/modules/ldapbackend/powerldap.cc index 2b3ae4044..bfec0cd34 100644 --- a/modules/ldapbackend/powerldap.cc +++ b/modules/ldapbackend/powerldap.cc @@ -32,7 +32,7 @@ PowerLDAP::SearchResult::SearchResult( int msgid, LDAP* ld ) - : d_msgid( msgid ), d_ld( ld ), d_finished( false ) + : d_ld( ld ), d_msgid( msgid ), d_finished( false ) { } @@ -449,12 +449,12 @@ const string PowerLDAP::escape( const string& str ) for( i = str.begin(); i != str.end(); i++ ) { // RFC4515 3 - if( *i == '*' || - *i == '(' || - *i == ')' || - *i == '\\' || - *i == '\0' || - *i > 127) + if( (unsigned char)*i == '*' || + (unsigned char)*i == '(' || + (unsigned char)*i == ')' || + (unsigned char)*i == '\\' || + (unsigned char)*i == '\0' || + (unsigned char)*i > 127) { sprintf(tmp,"\\%02x", (unsigned char)*i);