From: Ralf Haferkamp Date: Tue, 16 Feb 2010 11:55:33 +0000 (+0000) Subject: silenced compiler warning X-Git-Tag: MIGRATION_CVS2GIT~693 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=4ea6beae068a4332d10f8dd0d61e6b0eeb8e4678;p=openldap silenced compiler warning --- diff --git a/contrib/ldapc++/src/TlsOptions.cpp b/contrib/ldapc++/src/TlsOptions.cpp index 0cba46ea18..9c5ebd67e5 100644 --- a/contrib/ldapc++/src/TlsOptions.cpp +++ b/contrib/ldapc++/src/TlsOptions.cpp @@ -39,7 +39,7 @@ static tls_optmap_t optmap[] = { #endif void checkOpt( TlsOptions::tls_option opt, opttype type ){ - if ( opt >= sizeof(optmap) ){ + if ( opt < TlsOptions::CACERTFILE || opt >= TlsOptions::LASTOPT ){ throw( LDAPException( LDAP_PARAM_ERROR, "unknown Option" ) ); } diff --git a/contrib/ldapc++/src/TlsOptions.h b/contrib/ldapc++/src/TlsOptions.h index 573b4f95c8..59da72a50e 100644 --- a/contrib/ldapc++/src/TlsOptions.h +++ b/contrib/ldapc++/src/TlsOptions.h @@ -21,7 +21,8 @@ class TlsOptions { RANDOM_FILE, CRLCHECK, DHFILE, - NEWCTX + NEWCTX, + LASTOPT /* dummy */ }; TlsOptions( LDAP* ld=NULL );