openldap-2.6.8-3.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/common.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def2]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/common.c:1636:11: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value
# 1634|   	}
# 1635|   
# 1636|-> 	if ( err != LDAP_SUCCESS
# 1637|   		|| msgbuf[0]
# 1638|   		|| ( matched && matched[ 0 ] )

Error: CLANG_WARNING: [#def3]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/common.c:2009:5: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read
# 2007|   				ptr = str;
# 2008|   				ptr = lutil_strncopy( ptr, bv.bv_val, bv.bv_len );
# 2009|-> 				ptr = lutil_strcopy( ptr, ": " );
# 2010|   			}
# 2011|   		

Error: CLANG_WARNING: [#def4]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/common.c:2149:4: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read
# 2147|   		if ( chgpres ) {
# 2148|   			len = snprintf( ptr, blen, " changeNumber %ld", chgnum) ;
# 2149|-> 			ptr += len;
# 2150|   			blen -= len;
# 2151|   		}

Error: CLANG_WARNING: [#def5]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/common.c:2150:4: warning[deadcode.DeadStores]: Value stored to 'blen' is never read
# 2148|   			len = snprintf( ptr, blen, " changeNumber %ld", chgnum) ;
# 2149|   			ptr += len;
# 2150|-> 			blen -= len;
# 2151|   		}
# 2152|   

Error: CLANG_WARNING: [#def6]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/common.c:2153:3: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value
# 2151|   		}
# 2152|   
# 2153|-> 		tool_write_ldif( ldif ? LDIF_PUT_COMMENT : LDIF_PUT_VALUE,
# 2154|   			ldif ? "persistentSearch: " : "persistentSearch", buf, len );
# 2155|   	}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def7]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/common.c: scope_hint: In function ‘print_psearch’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/common.c:2153:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘len’
# 2151|   		}
# 2152|   
# 2153|-> 		tool_write_ldif( ldif ? LDIF_PUT_COMMENT : LDIF_PUT_VALUE,
# 2154|   			ldif ? "persistentSearch: " : "persistentSearch", buf, len );
# 2155|   	}

Error: COMPILER_WARNING (CWE-457): [#def8]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/common.c: scope_hint: In function ‘print_psearch’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/common.c:2153:17: warning[-Wmaybe-uninitialized]: ‘len’ may be used uninitialized
# 2153 |                 tool_write_ldif( ldif ? LDIF_PUT_COMMENT : LDIF_PUT_VALUE,
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 2154 |                         ldif ? "persistentSearch: " : "persistentSearch", buf, len );
#      |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/common.c:2118:41: note: ‘len’ was declared here
# 2118 |                 int blen = sizeof(buf), len;
#      |                                         ^~~
# 2151|   		}
# 2152|   
# 2153|-> 		tool_write_ldif( ldif ? LDIF_PUT_COMMENT : LDIF_PUT_VALUE,
# 2154|   			ldif ? "persistentSearch: " : "persistentSearch", buf, len );
# 2155|   	}

Error: CLANG_WARNING: [#def9]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/common.c:2705:4: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read
# 2703|   		if ( b64.bv_len ) {
# 2704|   			ptr = lutil_strcopy( ptr, " " );
# 2705|-> 			ptr = lutil_strcopy( ptr, b64.bv_val );
# 2706|   		}
# 2707|   

Error: CPPCHECK_WARNING: [#def10]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapcompare.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def11]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapcompare.c: scope_hint: In function ‘main’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapcompare.c:217:33: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘bvalue.bv_val’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  215|   	if ( *sep != ':' ) {
#  216|   		bvalue.bv_val = strdup( sep );
#  217|-> 		bvalue.bv_len = strlen( bvalue.bv_val );
#  218|   
#  219|   	} else {

Error: CPPCHECK_WARNING: [#def12]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapdelete.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def13]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapexop.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def14]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapmodify.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def15]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapmodrdn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def16]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldappasswd.c: scope_hint: In function ‘handle_private_option’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldappasswd.c:135:32: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘oldpw.bv_val’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  133|   			}
#  134|   		}
#  135|-> 		oldpw.bv_len = strlen( oldpw.bv_val );
#  136|   		break;
#  137|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def17]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldappasswd.c:150:32: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘newpw.bv_val’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  148|   			}
#  149|   		}
#  150|-> 		newpw.bv_len = strlen( newpw.bv_val );
#  151|   		break;
#  152|   

Error: CPPCHECK_WARNING: [#def18]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapsearch.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def19]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapsearch.c:1262:11: warning[deadcode.DeadStores]: Although the value stored to 'err' is used in the enclosing expression, the value is never actually read from 'err'
# 1260|   			}
# 1261|   
# 1262|-> 			if ( ( err = ldap_put_vrFilter( ber, vrFilter ) ) == -1 ) {
# 1263|   				ber_free( ber, 1 );
# 1264|   				fprintf( stderr, _("Bad ValuesReturnFilter: %s\n"), vrFilter );

Error: CLANG_WARNING: [#def20]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapsearch.c:1556:11: warning[core.NonNullParamChecker]: Null pointer passed to 3rd parameter expecting 'nonnull'
# 1554|   		rc = 0;
# 1555|   		first = 1;
# 1556|-> 		while ( fgets( line, sizeof( line ), fp ) != NULL ) { 
# 1557|   			line[ strlen( line ) - 1 ] = '\0';
# 1558|   			if ( !first ) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def21]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapsearch.c: scope_hint: In function ‘main’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapsearch.c:1556:25: warning[-Wanalyzer-null-argument]: use of NULL ‘fp’ where non-null expected
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapsearch.c:41: included_from: Included from here.
/usr/include/stdio.h:654:14: note: argument 3 of ‘fgets’ must be non-null
# 1554|   		rc = 0;
# 1555|   		first = 1;
# 1556|-> 		while ( fgets( line, sizeof( line ), fp ) != NULL ) { 
# 1557|   			line[ strlen( line ) - 1 ] = '\0';
# 1558|   			if ( !first ) {

Error: CLANG_WARNING: [#def22]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapsearch.c:1947:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1945|   	FILE		*tmpfp;
# 1946|   
# 1947|-> 	rc = ldap_get_dn_ber( ld, entry, &ber, &bv );
# 1948|   
# 1949|   	if ( ldif < 2 ) {

Error: CLANG_WARNING: [#def23]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapsearch.c:2250:5: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
# 2248|   			if ( tag == LDAP_TAG_REFRESHDELETES ) {
# 2249|   				ber_get_boolean( syncinfo, &refreshDeletes );
# 2250|-> 				tag = ber_peek_tag( syncinfo, &len );
# 2251|   			}
# 2252|   			if ( refreshDeletes ) {

Error: CPPCHECK_WARNING: [#def24]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapurl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapurl.c: scope_hint: In function ‘main’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapurl.c:290:49: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  288|   			lud.lud_exts = (char **)realloc( lud.lud_exts,
#  289|   				sizeof( char * ) * ( nexts + 2 ) );
#  290|-> 			lud.lud_exts[ nexts++ ] = optarg;
#  291|   			lud.lud_exts[ nexts ] = NULL;
#  292|   			break;

Error: CPPCHECK_WARNING: [#def26]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapvc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def27]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapvc.c: scope_hint: In function ‘main’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapvc.c:301:31: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘cred.bv_val’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  299|   	if (argc - optind > 0) {
#  300|   		cred.bv_val = strdup(argv[optind++]);
#  301|-> 		cred.bv_len = strlen(cred.bv_val);
#  302|   	}
#  303|   	if (argc - optind > 0) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def28]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapvc.c:318:31: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘cred.bv_val’ where non-null expected
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapvc.c:42: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapvc.c:312:32: note: in expansion of macro ‘getpassphrase’
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  316|   		}
#  317|   		cred.bv_val = strdup(userpw);
#  318|-> 		cred.bv_len = strlen(cred.bv_val);
#  319|   	}
#  320|   

Error: CLANG_WARNING: [#def29]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapvc.c:332:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  330|   
#  331|   	if ( dont ) {
#  332|-> 		rc = LDAP_SUCCESS;
#  333|   		goto skip;
#  334|   	}

Error: CLANG_WARNING: [#def30]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapvc.c:413:7: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  411|   			ldap_get_option(ld, LDAP_OPT_DIAGNOSTIC_MESSAGE, (void*) &text);
#  412|   		    tool_perror( "ldap_verify_credentials", rc, NULL, NULL, text, NULL );
#  413|-> 		    rc = EXIT_FAILURE;
#  414|   		    goto skip;
#  415|   	    }

Error: CLANG_WARNING: [#def31]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapvc.c:449:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  447|   	if (rc != LDAP_SUCCESS) {
#  448|   		tool_perror( "ldap_parse_result", rc, NULL, matcheddn, text, refs );
#  449|-> 		rc = EXIT_FAILURE;
#  450|   		goto skip;
#  451|   	}

Error: CLANG_WARNING: [#def32]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapvc.c:458:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  456|   	if (rc != LDAP_SUCCESS) {
#  457|   		tool_perror( "ldap_parse_verify_credentials", rc, NULL, NULL, NULL, NULL );
#  458|-> 		rc = EXIT_FAILURE;
#  459|   		goto skip;
#  460|   	}

Error: CLANG_WARNING: [#def33]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapwhoami.c:136:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  134|   
#  135|   	if ( dont ) {
#  136|-> 		rc = LDAP_SUCCESS;
#  137|   		goto skip;
#  138|   	}

Error: CLANG_WARNING: [#def34]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapwhoami.c:146:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  144|   	if( rc != LDAP_SUCCESS ) {
#  145|   		tool_perror( "ldap_whoami", rc, NULL, NULL, NULL, NULL );
#  146|-> 		rc = EXIT_FAILURE;
#  147|   		goto skip;
#  148|   	}

Error: CLANG_WARNING: [#def35]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapwhoami.c:180:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  178|   	if ( rc != LDAP_SUCCESS ) {
#  179|   		tool_perror( "ldap_parse_result", rc, NULL, matcheddn, text, refs );
#  180|-> 		rc = EXIT_FAILURE;
#  181|   		goto skip;
#  182|   	}

Error: CLANG_WARNING: [#def36]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldapwhoami.c:188:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  186|   	if( rc != LDAP_SUCCESS ) {
#  187|   		tool_perror( "ldap_parse_whoami", rc, NULL, NULL, NULL, NULL );
#  188|-> 		rc = EXIT_FAILURE;
#  189|   		goto skip;
#  190|   	}

Error: COMPILER_WARNING: [#def37]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldcversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def38]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/lddversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def39]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldeversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def40]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldmversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def41]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldpversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def42]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldrversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def43]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldsversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def44]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/lduversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def45]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldvversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def46]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/clients/tools/ldwversion.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: CPPCHECK_WARNING: [#def47]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/contrib/slapd-modules/allop/allop.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def48]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/contrib/slapd-modules/smbk5pwd/smbk5pwd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-477): [#def49]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/contrib/slapd-modules/smbk5pwd/smbk5pwd.c: scope_hint: In function ‘nthash’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/contrib/slapd-modules/smbk5pwd/smbk5pwd.c:179:9: warning[-Wdeprecated-declarations]: ‘MD4_Init’ is deprecated: Since OpenSSL 3.0
#  179 |         MD4_Init( &ctx );
#      |         ^~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/contrib/slapd-modules/smbk5pwd/smbk5pwd.c:72: included_from: Included from here.
/usr/include/openssl/md4.h:50:27: note: declared here
#   50 | OSSL_DEPRECATEDIN_3_0 int MD4_Init(MD4_CTX *c);
#      |                           ^~~~~~~~
#  177|   
#  178|   #ifdef HAVE_OPENSSL
#  179|-> 	MD4_Init( &ctx );
#  180|   	MD4_Update( &ctx, passwd->bv_val, passwd->bv_len );
#  181|   	MD4_Final( (unsigned char *)hbuf, &ctx );

Error: COMPILER_WARNING (CWE-477): [#def50]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/contrib/slapd-modules/smbk5pwd/smbk5pwd.c:180:9: warning[-Wdeprecated-declarations]: ‘MD4_Update’ is deprecated: Since OpenSSL 3.0
#  180 |         MD4_Update( &ctx, passwd->bv_val, passwd->bv_len );
#      |         ^~~~~~~~~~
/usr/include/openssl/md4.h:51:27: note: declared here
#   51 | OSSL_DEPRECATEDIN_3_0 int MD4_Update(MD4_CTX *c, const void *data, size_t len);
#      |                           ^~~~~~~~~~
#  178|   #ifdef HAVE_OPENSSL
#  179|   	MD4_Init( &ctx );
#  180|-> 	MD4_Update( &ctx, passwd->bv_val, passwd->bv_len );
#  181|   	MD4_Final( (unsigned char *)hbuf, &ctx );
#  182|   #elif defined(HAVE_GNUTLS)

Error: COMPILER_WARNING (CWE-477): [#def51]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/contrib/slapd-modules/smbk5pwd/smbk5pwd.c:181:9: warning[-Wdeprecated-declarations]: ‘MD4_Final’ is deprecated: Since OpenSSL 3.0
#  181 |         MD4_Final( (unsigned char *)hbuf, &ctx );
#      |         ^~~~~~~~~
/usr/include/openssl/md4.h:52:27: note: declared here
#   52 | OSSL_DEPRECATEDIN_3_0 int MD4_Final(unsigned char *md, MD4_CTX *c);
#      |                           ^~~~~~~~~
#  179|   	MD4_Init( &ctx );
#  180|   	MD4_Update( &ctx, passwd->bv_val, passwd->bv_len );
#  181|-> 	MD4_Final( (unsigned char *)hbuf, &ctx );
#  182|   #elif defined(HAVE_GNUTLS)
#  183|   	md4_init( &ctx );

Error: COMPILER_WARNING (CWE-665): [#def52]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/contrib/slapd-modules/smbk5pwd/smbk5pwd.c: scope_hint: At top level
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/contrib/slapd-modules/smbk5pwd/smbk5pwd.c:625:39: warning[-Wmissing-braces]: missing braces around initializer
#  625 | static ConfigTable smbk5pwd_cfats[] = {
#      |                                       ^
#  623|    */
#  624|   
#  625|-> static ConfigTable smbk5pwd_cfats[] = {
#  626|   	{ "smbk5pwd-enable", "arg",
#  627|   		2, 0, 0, ARG_MAGIC|PC_SMB_ENABLE, smbk5pwd_cf_func,

Error: GCC_ANALYZER_WARNING (CWE-775): [#def53]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/detach.c:36: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/detach.c: scope_hint: In function ‘lutil_detach’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/signal.h:25:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘sd’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/detach.c:141:16: note: in expansion of macro ‘SIGNAL’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/detach.c:141:16: note: in expansion of macro ‘SIGNAL’
#   23|   
#   24|   #if defined( HAVE_SIGACTION )
#   25|-> #define SIGNAL lutil_sigaction
#   26|   typedef void (*lutil_sig_t)(int);
#   27|   LDAP_LUTIL_F(lutil_sig_t) lutil_sigaction( int sig, lutil_sig_t func );

Error: COMPILER_WARNING (CWE-457): [#def54]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/getpass.c:40: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/signal.h:25:16: warning[-Wmaybe-uninitialized]: ‘sig’ may be used uninitialized
#   25 | #define SIGNAL lutil_sigaction
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/getpass.c:79:22: note: ‘sig’ was declared here
#   79 |         RETSIGTYPE (*sig)( int sig );
#      |                      ^~~
#   23|   
#   24|   #if defined( HAVE_SIGACTION )
#   25|-> #define SIGNAL lutil_sigaction
#   26|   typedef void (*lutil_sig_t)(int);
#   27|   LDAP_LUTIL_F(lutil_sig_t) lutil_sigaction( int sig, lutil_sig_t func );

Error: GCC_ANALYZER_WARNING (CWE-688): [#def55]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:19: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c: scope_hint: In function ‘ber_bvreplace_x’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/string.h:77:49: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/string.h:86:31: note: in expansion of macro ‘SAFEMEMCPY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:711:9: note: in expansion of macro ‘AC_MEMCPY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:16: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:705:18: note: in expansion of macro ‘BER_BVISNULL’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/lber-int.h:32: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:21: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:707:14: note: in expansion of macro ‘BER_BVISNULL’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/string.h:77:58: note: in definition of macro ‘SAFEMEMCPY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:711:9: note: in expansion of macro ‘AC_MEMCPY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/string.h:86:31: note: in expansion of macro ‘SAFEMEMCPY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:711:9: note: in expansion of macro ‘AC_MEMCPY’
<built-in>: note: argument 1 of ‘__builtin_memmove’ must be non-null
#   75|   #ifndef SAFEMEMCPY
#   76|   #	if defined( HAVE_MEMMOVE )
#   77|-> #		define SAFEMEMCPY( d, s, n ) 	memmove((d), (s), (n))
#   78|   #	elif defined( HAVE_BCOPY )
#   79|   #		define SAFEMEMCPY( d, s, n ) 	bcopy((s), (d), (n))

Error: GCC_ANALYZER_WARNING (CWE-688): [#def56]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/string.h:77:49: warning[-Wanalyzer-null-argument]: use of NULL ‘*dst.bv_val’ where non-null expected
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/string.h:86:31: note: in expansion of macro ‘SAFEMEMCPY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:711:9: note: in expansion of macro ‘AC_MEMCPY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:705:18: note: in expansion of macro ‘BER_BVISNULL’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:707:14: note: in expansion of macro ‘BER_BVISNULL’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/lber-int.h:29: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:235:17: note: in expansion of macro ‘ber_errno’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/string.h:86:31: note: in expansion of macro ‘SAFEMEMCPY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:711:9: note: in expansion of macro ‘AC_MEMCPY’
<built-in>: note: argument 1 of ‘__builtin_memmove’ must be non-null
#   75|   #ifndef SAFEMEMCPY
#   76|   #	if defined( HAVE_MEMMOVE )
#   77|-> #		define SAFEMEMCPY( d, s, n ) 	memmove((d), (s), (n))
#   78|   #	elif defined( HAVE_BCOPY )
#   79|   #		define SAFEMEMCPY( d, s, n ) 	bcopy((s), (d), (n))

Error: COMPILER_WARNING (CWE-457): [#def57]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/getpass.c:42: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/getpass.c: scope_hint: In function ‘lutil_getpass’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/termios.h:32:48: warning[-Wmaybe-uninitialized]: ‘flags’ may be used uninitialized
#   32 | #define SETFLAGS( tio, flags )  ((tio).c_lflag = (flags))
#      |                                 ~~~~~~~~~~~~~~~^~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/getpass.c:78:23: note: ‘flags’ was declared here
#   78 |         TERMFLAG_TYPE flags;
#      |                       ^~~~~
#   30|   #define SETATTR( fd, tiop )	tcsetattr((fd), TCSANOW /* 0 */, (tiop))
#   31|   #define GETFLAGS( tio )		((tio).c_lflag)
#   32|-> #define SETFLAGS( tio, flags )	((tio).c_lflag = (flags))
#   33|   
#   34|   #elif defined( HAVE_SGTTY_H )

Error: GCC_ANALYZER_WARNING (CWE-688): [#def58]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap.h:30: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:51: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c: scope_hint: In function ‘syncrepl_del_nonpresent’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lber.h:677:31: warning[-Wanalyzer-null-argument]: use of NULL ‘pdn.bv_val’ where non-null expected
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4810:38: note: in expansion of macro ‘ber_bvcmp’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4808:25: note: in expansion of macro ‘BER_BVZERO’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lber.h:675:11: note: in definition of macro ‘ber_bvcmp’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4810:38: note: in expansion of macro ‘ber_bvcmp’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4810:38: note: in expansion of macro ‘ber_bvcmp’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4810:38: note: in expansion of macro ‘ber_bvcmp’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/string.h:21: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:23: included_from: Included from here.
/usr/include/string.h:64:12: note: argument 2 of ‘memcmp’ must be non-null
#  675|   	((v1)->bv_len < (v2)->bv_len \
#  676|   		? -1 : ((v1)->bv_len > (v2)->bv_len \
#  677|-> 			? 1 : memcmp((v1)->bv_val, (v2)->bv_val, (v1)->bv_len) ))
#  678|   
#  679|   /*

Error: GCC_ANALYZER_WARNING (CWE-457): [#def59]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c: scope_hint: In function ‘ber_bvarray_dup_x’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lber_pvt.h:217:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.bv_val’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:766:22: note: in expansion of macro ‘BER_BVISNULL’
/usr/include/stdio.h:34: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:29: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/lber-int.h:31: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:766:22: note: in expansion of macro ‘BER_BVISNULL’
#  215|   		(bv)->bv_val = (s); \
#  216|   	} while (0)
#  217|-> #define BER_BVISNULL(bv)	((bv)->bv_val == NULL)
#  218|   #define BER_BVISEMPTY(bv)	((bv)->bv_len == 0)
#  219|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def60]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:49: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:38: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c: scope_hint: In function ‘slap_listener’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:159:33: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘accept(*sl.sl_sd, & from, & len)’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:2137:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:2137:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:2183:15: note: in expansion of macro ‘DAEMON_ID’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:2137:9: note: in expansion of macro ‘Debug’
#  157|   #define Log(level, severity, ...) \
#  158|   	do { \
#  159|-> 		if ( ldap_debug & (level) ) \
#  160|   			lutil_debug( ldap_debug, (level), __VA_ARGS__ ); \
#  161|   		if ( ldap_syslog & (level) ) \

Error: GCC_ANALYZER_WARNING (CWE-476): [#def61]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:49: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c: scope_hint: In function ‘syncrepl_message_to_entry’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:160:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘syncUUID’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3436:17: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3424:14: note: in expansion of macro ‘BER_BVISEMPTY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3436:17: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3436:17: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3436:17: note: in expansion of macro ‘Debug’
#  158|   	do { \
#  159|   		if ( ldap_debug & (level) ) \
#  160|-> 			lutil_debug( ldap_debug, (level), __VA_ARGS__ ); \
#  161|   		if ( ldap_syslog & (level) ) \
#  162|   			syslog( LDAP_LEVEL_MASK((severity)), __VA_ARGS__ ); \

Error: GCC_ANALYZER_WARNING (CWE-476): [#def62]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:49: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:30: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c: scope_hint: In function ‘dnssrv_back_search’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:160:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘urls’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:2756:19: note: in definition of macro ‘_SCM’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:2768:68: note: in expansion of macro ‘o_managedsait’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:64:23: note: in expansion of macro ‘get_manageDSAit’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:82:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:160:59: note: in definition of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:160:59: note: in definition of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
#  158|   	do { \
#  159|   		if ( ldap_debug & (level) ) \
#  160|-> 			lutil_debug( ldap_debug, (level), __VA_ARGS__ ); \
#  161|   		if ( ldap_syslog & (level) ) \
#  162|   			syslog( LDAP_LEVEL_MASK((severity)), __VA_ARGS__ ); \

Error: GCC_ANALYZER_WARNING (CWE-476): [#def63]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:162:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘syncUUID’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3436:17: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3424:14: note: in expansion of macro ‘BER_BVISEMPTY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3436:17: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3436:17: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3436:17: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3436:17: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3436:17: note: in expansion of macro ‘Debug’
#  160|   			lutil_debug( ldap_debug, (level), __VA_ARGS__ ); \
#  161|   		if ( ldap_syslog & (level) ) \
#  162|-> 			syslog( LDAP_LEVEL_MASK((severity)), __VA_ARGS__ ); \
#  163|   	} while ( 0 )
#  164|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def64]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:162:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘urls’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:2756:19: note: in definition of macro ‘_SCM’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:2768:68: note: in expansion of macro ‘o_managedsait’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:64:23: note: in expansion of macro ‘get_manageDSAit’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:82:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:162:62: note: in definition of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:162:62: note: in definition of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:119:9: note: in expansion of macro ‘Debug’
#  160|   			lutil_debug( ldap_debug, (level), __VA_ARGS__ ); \
#  161|   		if ( ldap_syslog & (level) ) \
#  162|-> 			syslog( LDAP_LEVEL_MASK((severity)), __VA_ARGS__ ); \
#  163|   	} while ( 0 )
#  164|   

Error: GCC_ANALYZER_WARNING (CWE-131): [#def65]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:57: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/lload.h:45: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/client.c:25: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/client.c: scope_hint: In function ‘client_init’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_queue.h:533:31: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/client.c:627:5: note: in expansion of macro ‘LDAP_CIRCLEQ_INSERT_TAIL’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/lload.h:416:9: note: in expansion of macro ‘checked_lock’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/client.c:603:5: note: in expansion of macro ‘CONNECTION_LOCK’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/client.c:626:5: note: in expansion of macro ‘checked_lock’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/client.c:627:5: note: in expansion of macro ‘LDAP_CIRCLEQ_INSERT_TAIL’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/client.c:627:5: note: in expansion of macro ‘LDAP_CIRCLEQ_INSERT_TAIL’
#  531|   
#  532|   #define LDAP_CIRCLEQ_INSERT_TAIL(head, elm, field) do {			\
#  533|-> 	(elm)->field.cqe_next = (void *)(head);				\
#  534|   	(elm)->field.cqe_prev = (head)->cqh_last;			\
#  535|   	if ((head)->cqh_first == (void *)(head))			\

Error: CLANG_WARNING: [#def66]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/bprint.c:220:3: warning[deadcode.DeadStores]: Value stored to 'off' is never read
#  218|   		line[off+1] = hexdig[0x0f & data[i]];
#  219|   		
#  220|-> 		off = BP_GRAPH + n + ((n >= 8)?1:0);
#  221|   
#  222|   		if ( isprint( (unsigned char) data[i] )) {

Error: CPPCHECK_WARNING: [#def67]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/decode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-457): [#def68]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/decode.c: scope_hint: In function ‘ber_get_stringbvl’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/decode.c:467:35: warning[-Wmaybe-uninitialized]: ‘res.bo’ may be used uninitialized
#  467 |                         res.bv[n] = bvp;
#      |                         ~~~~~~~~~~^~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/decode.c:393:11: note: ‘res.bo’ was declared here
#  393 |         } res;
#      |           ^~~
#  465|   				goto failed;
#  466|   			}
#  467|-> 			res.bv[n] = bvp;
#  468|   			*bvp = bv;
#  469|   			break;

Error: CPPCHECK_WARNING: [#def69]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/encode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def70]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/etest.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def71]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/etest.c: scope_hint: In function ‘main’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/etest.c:143:30: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  141|   		case 'B':	/* bit string */
#  142|   			buf = getbuf();
#  143|-> 			rc = ber_printf( ber, fmt, buf, strlen(buf) );
#  144|   			break;
#  145|   

Error: CPPCHECK_WARNING: [#def72]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/io.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def73]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def74]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/memory.c:766:8: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value
#  764|   	for (j=0; j<i; j++) {
#  765|   		ber_dupbv_x( &new[j], &src[j], ctx );
#  766|-> 		if ( BER_BVISNULL( &new[j] )) {
#  767|   			ber_bvarray_free_x( new, ctx );
#  768|   			return -1;

Error: COMPILER_WARNING (CWE-563): [#def75]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/options.c: scope_hint: In function ‘ber_get_option’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/options.c:37:24: warning[-Wunused-but-set-variable]: variable ‘sb’ set but not used
#   37 |         const Sockbuf *sb;
#      |                        ^~
#   35|   {
#   36|   	const BerElement *ber;
#   37|-> 	const Sockbuf *sb;
#   38|   
#   39|   	if(outvalue == NULL) {

Error: CLANG_WARNING: [#def76]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/options.c:80:2: warning[deadcode.DeadStores]: Value stored to 'sb' is never read
#   78|   
#   79|   	ber = item;
#   80|-> 	sb = item;
#   81|   
#   82|   	switch(option) {

Error: COMPILER_WARNING (CWE-563): [#def77]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/options.c: scope_hint: In function ‘ber_set_option’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/options.c:129:18: warning[-Wunused-but-set-variable]: variable ‘sb’ set but not used
#  129 |         Sockbuf *sb;
#      |                  ^~
#  127|   {
#  128|   	BerElement *ber;
#  129|-> 	Sockbuf *sb;
#  130|   
#  131|   	if(invalue == NULL) {

Error: CLANG_WARNING: [#def78]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/options.c:197:2: warning[deadcode.DeadStores]: Value stored to 'sb' is never read
#  195|   
#  196|   	ber = item;
#  197|-> 	sb = item;
#  198|   
#  199|   	switch(option) {

Error: COMPILER_WARNING: [#def79]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def80]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblber/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: liblber.la 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def81]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/abandon.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def82]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/abandon.c:212:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  210|   				struct sockaddr_storage sa = {0};
#  211|   				/* dummy, filled with ldo_peer in request.c */
#  212|-> 				err = ber_write( ber, (char *) &sa, sizeof(sa), 0 );
#  213|   			}
#  214|   			if ( LDAP_IS_UDP(ld) && ld->ld_options.ldo_version ==

Error: CPPCHECK_WARNING: [#def83]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/account_usability.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def84]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/account_usability.c: scope_hint: In function ‘ldap_parse_accountusability_control’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/account_usability.c:54:15: warning[-Wunused-variable]: unused variable ‘last’
#   54 |         char *last;
#      |               ^~~~
#   52|   	ber_tag_t tag;
#   53|   	ber_len_t berLen;
#   54|-> 	char *last;
#   55|   
#   56|   	assert( ld != NULL );

Error: CPPCHECK_WARNING: [#def85]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/add.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def86]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/add.c:84:2: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
#   82|   		return -1;
#   83|   
#   84|-> 	return msgid;
#   85|   }
#   86|   

Error: CLANG_WARNING: [#def87]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/add.c:252:7: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  250|   		return( rc );
#  251|   
#  252|-> 	if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, &res ) == -1 || !res )
#  253|   		return( ld->ld_errno );
#  254|   

Error: CPPCHECK_WARNING: [#def88]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/apitest.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def89]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/avl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def90]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/avl.c:344:4: warning[deadcode.DeadStores]: Value stored to 'p' is never read
#  342|   			}
#  343|   			/* end case 3 */
#  344|-> 			p = q;
#  345|   		}
#  346|   		if ( !depth )

Error: CPPCHECK_WARNING: [#def91]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/charray.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def92]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/charray.c: scope_hint: In function ‘ldap_charray2str’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/charray.c:269:17: warning[-Wstringop-truncation]: ‘strncpy’ specified bound depends on the length of the source argument
#  269 |                 strncpy( p, *v, len );
#      |                 ^
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/charray.c:268:23: note: length computed here
#  268 |                 len = strlen( *v );
#      |                       ^~~~~~~~~~~~
#  267|   
#  268|   		len = strlen( *v );
#  269|-> 		strncpy( p, *v, len );
#  270|   		p += len;
#  271|   	}

Error: CLANG_WARNING: [#def93]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/compare.c:154:2: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
#  152|   	bvalue.bv_len = (value == NULL) ? 0 : strlen( value );
#  153|   
#  154|-> 	return ldap_compare_ext( ld, dn, attr, &bvalue, NULL, NULL, &msgid ) == LDAP_SUCCESS
#  155|   		? msgid : -1;
#  156|   }

Error: CLANG_WARNING: [#def94]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/compare.c:176:7: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  174|   		return( rc );
#  175|   
#  176|-> 	if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, &res ) == -1 || !res )
#  177|   		return( ld->ld_errno );
#  178|   

Error: CPPCHECK_WARNING: [#def95]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/controls.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def96]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/controls.c:232:4: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
#  230|   		if( tag == LBER_BOOLEAN ) {
#  231|   			ber_int_t crit;
#  232|-> 			tag = ber_scanf( ber, "b", &crit );
#  233|   			tctrl->ldctl_iscritical = crit ? (char) 0 : (char) ~0;
#  234|   			tag = ber_peek_tag( ber, &len );

Error: CLANG_WARNING: [#def97]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/controls.c:238:4: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
#  236|   
#  237|   		if( tag == LBER_OCTETSTRING ) {
#  238|-> 			tag = ber_scanf( ber, "o", &tctrl->ldctl_value );
#  239|   		} else {
#  240|   			BER_BVZERO( &tctrl->ldctl_value );

Error: CPPCHECK_WARNING: [#def98]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/cyrus.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def99]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/delete.c:139:7: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  137|   		return( ld->ld_errno );
#  138|   
#  139|-> 	if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, &res ) == -1 || !res )
#  140|   		return( ld->ld_errno );
#  141|   

Error: CLANG_WARNING: [#def100]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/delete.c:165:2: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
#  163|   	Debug0( LDAP_DEBUG_TRACE, "ldap_delete\n" );
#  164|   
#  165|-> 	return ldap_delete_ext( ld, dn, NULL, NULL, &msgid ) == LDAP_SUCCESS
#  166|   		? msgid : -1 ;
#  167|   }

Error: CPPCHECK_WARNING: [#def101]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/deref.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def102]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dnssrv.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def103]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dnssrv.c:318:23: warning[-Wunused-but-set-variable]: variable ‘class’ set but not used
#  318 |             int type, class, ttl, size;
#      |                       ^~~~~
#  316|   
#  317|   	while (p < reply + len) {
#  318|-> 	    int type, class, ttl, size;
#  319|   	    status = dn_expand(reply, reply + len, p, host, sizeof(host));
#  320|   	    if (status < 0) {

Error: COMPILER_WARNING (CWE-563): [#def104]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dnssrv.c: scope_hint: In function ‘ldap_domain2hostlist’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dnssrv.c:318:30: warning[-Wunused-but-set-variable]: variable ‘ttl’ set but not used
#  318 |             int type, class, ttl, size;
#      |                              ^~~
#  316|   
#  317|   	while (p < reply + len) {
#  318|-> 	    int type, class, ttl, size;
#  319|   	    status = dn_expand(reply, reply + len, p, host, sizeof(host));
#  320|   	    if (status < 0) {

Error: CLANG_WARNING: [#def105]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dnssrv.c:326:6: warning[deadcode.DeadStores]: Value stored to 'class' is never read
#  324|   	    type = (p[0] << 8) | p[1];
#  325|   	    p += 2;
#  326|-> 	    class = (p[0] << 8) | p[1];
#  327|   	    p += 2;
#  328|   	    ttl = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];

Error: CLANG_WARNING: [#def106]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dnssrv.c:328:6: warning[deadcode.DeadStores]: Value stored to 'ttl' is never read
#  326|   	    class = (p[0] << 8) | p[1];
#  327|   	    p += 2;
#  328|-> 	    ttl = (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
#  329|   	    p += 4;
#  330|   	    size = (p[0] << 8) | p[1];

Error: CPPCHECK_WARNING: [#def107]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dntest.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def108]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dntest.c:105:17: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
#  103|   	
#  104|   				if ( !strcasecmp( s, "V3" ) ) {
#  105|-> 					flags[ i ] |= LDAP_DN_FORMAT_LDAPV3;
#  106|   				} else if ( !strcasecmp( s, "V2" ) ) {
#  107|   					flags[ i ] |= LDAP_DN_FORMAT_LDAPV2;

Error: CLANG_WARNING: [#def109]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dntest.c:107:17: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
#  105|   					flags[ i ] |= LDAP_DN_FORMAT_LDAPV3;
#  106|   				} else if ( !strcasecmp( s, "V2" ) ) {
#  107|-> 					flags[ i ] |= LDAP_DN_FORMAT_LDAPV2;
#  108|   				} else if ( !strcasecmp( s, "DCE" ) ) {
#  109|   					flags[ i ] |= LDAP_DN_FORMAT_DCE;

Error: CLANG_WARNING: [#def110]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dntest.c:109:17: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
#  107|   					flags[ i ] |= LDAP_DN_FORMAT_LDAPV2;
#  108|   				} else if ( !strcasecmp( s, "DCE" ) ) {
#  109|-> 					flags[ i ] |= LDAP_DN_FORMAT_DCE;
#  110|   				} else if ( !strcasecmp( s, "UFN" ) ) {
#  111|   					flags[ i ] |= LDAP_DN_FORMAT_UFN;

Error: CLANG_WARNING: [#def111]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dntest.c:111:17: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
#  109|   					flags[ i ] |= LDAP_DN_FORMAT_DCE;
#  110|   				} else if ( !strcasecmp( s, "UFN" ) ) {
#  111|-> 					flags[ i ] |= LDAP_DN_FORMAT_UFN;
#  112|   				} else if ( !strcasecmp( s, "AD" ) ) {
#  113|   					flags[ i ] |= LDAP_DN_FORMAT_AD_CANONICAL;

Error: CLANG_WARNING: [#def112]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dntest.c:113:17: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
#  111|   					flags[ i ] |= LDAP_DN_FORMAT_UFN;
#  112|   				} else if ( !strcasecmp( s, "AD" ) ) {
#  113|-> 					flags[ i ] |= LDAP_DN_FORMAT_AD_CANONICAL;
#  114|   				} else if ( !strcasecmp( s, "PRETTY" ) ) {
#  115|   					flags[ i ] |= LDAP_DN_PRETTY;

Error: CLANG_WARNING: [#def113]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dntest.c:115:17: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
#  113|   					flags[ i ] |= LDAP_DN_FORMAT_AD_CANONICAL;
#  114|   				} else if ( !strcasecmp( s, "PRETTY" ) ) {
#  115|-> 					flags[ i ] |= LDAP_DN_PRETTY;
#  116|   				} else if ( !strcasecmp( s, "PEDANTIC" ) ) {
#  117|   					flags[ i ] |= LDAP_DN_PEDANTIC;

Error: CLANG_WARNING: [#def114]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dntest.c:117:17: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
#  115|   					flags[ i ] |= LDAP_DN_PRETTY;
#  116|   				} else if ( !strcasecmp( s, "PEDANTIC" ) ) {
#  117|-> 					flags[ i ] |= LDAP_DN_PEDANTIC;
#  118|   				} else if ( !strcasecmp( s, "NOSPACES" ) ) {
#  119|   					flags[ i ] |= LDAP_DN_P_NOLEADTRAILSPACES;

Error: CLANG_WARNING: [#def115]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dntest.c:119:17: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
#  117|   					flags[ i ] |= LDAP_DN_PEDANTIC;
#  118|   				} else if ( !strcasecmp( s, "NOSPACES" ) ) {
#  119|-> 					flags[ i ] |= LDAP_DN_P_NOLEADTRAILSPACES;
#  120|   				} else if ( !strcasecmp( s, "NOONESPACE" ) ) {
#  121|   					flags[ i ] |= LDAP_DN_P_NOSPACEAFTERRDN;

Error: CLANG_WARNING: [#def116]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/dntest.c:121:17: warning[core.uninitialized.Assign]: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage
#  119|   					flags[ i ] |= LDAP_DN_P_NOLEADTRAILSPACES;
#  120|   				} else if ( !strcasecmp( s, "NOONESPACE" ) ) {
#  121|-> 					flags[ i ] |= LDAP_DN_P_NOSPACEAFTERRDN;
#  122|   				}
#  123|   			}

Error: CPPCHECK_WARNING: [#def117]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/error.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def118]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/extended.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def119]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/extended.c:159:10: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  157|   	}
#  158|    
#  159|->     if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, &res ) == -1 || !res ) {
#  160|           return( ld->ld_errno );
#  161|   	}

Error: CPPCHECK_WARNING: [#def120]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/filter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def121]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ftest.c:83:2: warning[unix.Malloc]: Potential memory leak
#   81|   	}
#   82|   
#   83|-> 	return filter2ber( strdup( argv[optind] ) );
#   84|   }
#   85|   

Error: CPPCHECK_WARNING: [#def122]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/getdn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def123]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/getdn.c:2151:4: warning[deadcode.DeadStores]: Value stored to 'cl' is never read
# 2149|   		 */
# 2150|   		if ( val->bv_val[ s ] == '\0' ) {
# 2151|-> 			cl = 1;
# 2152|   			str[ d++ ] = '\\';
# 2153|   			str[ d++ ] = '0';

Error: CPPCHECK_WARNING: [#def124]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/getvalues.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def125]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/init.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def126]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/init.c:39:9: warning[-Wmissing-braces]: missing braces around initializer
#   39 |         { LDAP_UNINITIALIZED, LDAP_DEBUG_NONE
#      |         ^
#   37|   
#   38|   struct ldapoptions ldap_int_global_options =
#   39|-> 	{ LDAP_UNINITIALIZED, LDAP_DEBUG_NONE
#   40|   		LDAP_LDO_NULLARG
#   41|   		LDAP_LDO_SOURCEIP_NULLARG

Error: COMPILER_WARNING (CWE-563): [#def127]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/init.c: scope_hint: In function ‘ldap_pvt_conf_option’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/init.c:264:13: warning[-Wunused-variable]: unused variable ‘rc’
#  264 |         int rc = LDAP_OPT_ERROR;
#      |             ^~
#  262|   {
#  263|   	struct ldapoptions *gopts;
#  264|-> 	int rc = LDAP_OPT_ERROR;
#  265|   
#  266|   	/* Get pointer to global option structure */

Error: COMPILER_WARNING (CWE-563): [#def128]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/init.c: scope_hint: In function ‘openldap_ldap_init_w_conf’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/init.c:286:13: warning[-Wunused-variable]: unused variable ‘i’
#  286 |         int i;
#      |             ^
#  284|   	char linebuf[ AC_LINE_MAX ];
#  285|   	FILE *fp;
#  286|-> 	int i;
#  287|   	char *cmd, *opt;
#  288|   	char *start, *end;

Error: CLANG_WARNING: [#def129]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldap_sync.c:145:2: warning[deadcode.DeadStores]: Value stored to 'phase' is never read
#  143|   	assert( res != NULL );
#  144|   
#  145|-> 	phase = ls->ls_refreshPhase;
#  146|   
#  147|   	/* OK */

Error: CLANG_WARNING: [#def130]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldap_sync.c:790:6: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  788|   				switch ( ldap_msgtype( msg ) ) {
#  789|   				case LDAP_RES_SEARCH_ENTRY:
#  790|-> 					rc = ldap_sync_search_entry( ls, res );
#  791|   					break;
#  792|   

Error: CLANG_WARNING: [#def131]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldap_sync.c:794:6: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  792|   
#  793|   				case LDAP_RES_SEARCH_REFERENCE:
#  794|-> 					rc = ldap_sync_search_reference( ls, res );
#  795|   					break;
#  796|   

Error: CPPCHECK_WARNING: [#def132]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldif.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def133]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldif.c:165:9: warning[deadcode.DeadStores]: Value stored to 'byte' during its initialization is never read
#  163|   
#  164|   	if ( b64 ) {
#  165|-> 		char *byte = s;
#  166|   
#  167|   		if ( *s == '\0' ) {

Error: COMPILER_WARNING (CWE-563): [#def134]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldif.c: scope_hint: In function ‘ldif_parse_line2’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldif.c:165:23: warning[-Wunused-variable]: unused variable ‘byte’
#  165 |                 char *byte = s;
#      |                       ^~~~
#  163|   
#  164|   	if ( b64 ) {
#  165|-> 		char *byte = s;
#  166|   
#  167|   		if ( *s == '\0' ) {

Error: CPPCHECK_WARNING: [#def135]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def136]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:59:45: warning[-Wanalyzer-null-argument]: use of NULL ‘<unknown>’ where non-null expected
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:417:31: note: in expansion of macro ‘BV_CASEMATCH’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:59:11: note: in definition of macro ‘BV_CASEMATCH’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:417:31: note: in expansion of macro ‘BV_CASEMATCH’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:417:31: note: in expansion of macro ‘BV_CASEMATCH’
/usr/include/string.h:462: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/string.h:21: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:29: included_from: Included from here.
/usr/include/strings.h:116:12: note: argument 2 of ‘strcasecmp’ must be non-null
#   57|   
#   58|   #define	BV_CASEMATCH(a, b) \
#   59|-> 	((a)->bv_len == (b)->bv_len && 0 == strcasecmp((a)->bv_val, (b)->bv_val))
#   60|   
#   61|   static int parse_ldif_control LDAP_P(( struct berval *bval, LDAPControl ***ppctrls ));

Error: GCC_ANALYZER_WARNING (CWE-457): [#def137]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c: scope_hint: In function ‘ldap_parse_ldif_record_x’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:215:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘idn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:23: included_from: Included from here.
#  213|   		i = 0;
#  214|   	} else {
#  215|-> 		i = idn+1;
#  216|   		/* Check for "control" tag after dn and before changetype. */
#  217|   		if ( BV_CASEMATCH( lr->lr_btype+i, &BV_CONTROL )) {

Error: COMPILER_WARNING (CWE-457): [#def138]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c: scope_hint: In function ‘ldap_parse_ldif_record_x’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:215:19: warning[-Wmaybe-uninitialized]: ‘idn’ may be used uninitialized
#  215 |                 i = idn+1;
#      |                 ~~^~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:116:22: note: ‘idn’ was declared here
#  116 |         int i, j, k, idn, nmods;
#      |                      ^~~
#  213|   		i = 0;
#  214|   	} else {
#  215|-> 		i = idn+1;
#  216|   		/* Check for "control" tag after dn and before changetype. */
#  217|   		if ( BV_CASEMATCH( lr->lr_btype+i, &BV_CONTROL )) {

Error: CLANG_WARNING: [#def139]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:217:8: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  215|   		i = idn+1;
#  216|   		/* Check for "control" tag after dn and before changetype. */
#  217|-> 		if ( BV_CASEMATCH( lr->lr_btype+i, &BV_CONTROL )) {
#  218|   			/* Parse and add it to the list of controls */
#  219|   			if ( !( flags & LDIF_NO_CONTROLS ) ) {

Error: CLANG_WARNING: [#def140]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:241:7: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  239|   
#  240|   	/* Check for changetype */
#  241|-> 	if ( BV_CASEMATCH( lr->lr_btype+i, &BV_CHANGETYPE )) {
#  242|   #ifdef LIBERAL_CHANGETYPE_MODOP
#  243|   		/* trim trailing spaces (and log warning ...) */

Error: CLANG_WARNING: [#def141]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:411:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  409|   		BER_BVZERO(&bv);
#  410|   		for (i=idn; i<lr->lr_lines; i++) {
#  411|-> 			if ( BV_CASEMATCH( lr->lr_btype+i, &BV_DN )) {
#  412|   				fprintf( stderr, _("%s: attributeDescription \"%s\":"
#  413|   					" (possible missing newline"

Error: CLANG_WARNING: [#def142]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:417:10: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  415|   					errstr, lr->lr_btype[i].bv_val, linenum+i - 1, dn );
#  416|   			}
#  417|-> 			if ( !BV_CASEMATCH( lr->lr_btype+i, &bv )) {
#  418|   				bvl[k++] = NULL;
#  419|   				bv = lr->lr_btype[i];

Error: CLANG_WARNING: [#def143]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:417:10: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  415|   					errstr, lr->lr_btype[i].bv_val, linenum+i - 1, dn );
#  416|   			}
#  417|-> 			if ( !BV_CASEMATCH( lr->lr_btype+i, &bv )) {
#  418|   				bvl[k++] = NULL;
#  419|   				bv = lr->lr_btype[i];

Error: CLANG_WARNING: [#def144]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:462:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  460|   			expect_modop = 0;
#  461|   			expect_sep = 1;
#  462|-> 			if ( BV_CASEMATCH( lr->lr_btype+i, &BV_MODOPADD )) {
#  463|   				modop = LDAP_MOD_ADD;
#  464|   				lr->lr_mops[i] = M_SEP;

Error: CLANG_WARNING: [#def145]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:466:16: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  464|   				lr->lr_mops[i] = M_SEP;
#  465|   				nmods--;
#  466|-> 			} else if ( BV_CASEMATCH( lr->lr_btype+i, &BV_MODOPREPLACE )) {
#  467|   			/* defer handling these since they might have no values.
#  468|   			 * Use the BVALUES flag to signal that these were

Error: CLANG_WARNING: [#def146]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:475:16: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  473|   				lr->lr_mops[i] = modop | LDAP_MOD_BVALUES;
#  474|   				lr->lr_btype[i] = lr->lr_vals[i];
#  475|-> 			} else if ( BV_CASEMATCH( lr->lr_btype+i, &BV_MODOPDELETE )) {
#  476|   				modop = LDAP_MOD_DELETE;
#  477|   				lr->lr_mops[i] = modop | LDAP_MOD_BVALUES;

Error: CLANG_WARNING: [#def147]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:479:16: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  477|   				lr->lr_mops[i] = modop | LDAP_MOD_BVALUES;
#  478|   				lr->lr_btype[i] = lr->lr_vals[i];
#  479|-> 			} else if ( BV_CASEMATCH( lr->lr_btype+i, &BV_MODOPINCREMENT )) {
#  480|   				modop = LDAP_MOD_INCREMENT;
#  481|   				lr->lr_mops[i] = M_SEP;

Error: CLANG_WARNING: [#def148]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:540:47: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull'
#  538|   		if ( lr->lr_mops[i] == M_SEP )
#  539|   			continue;
#  540|-> 		if ( lr->lr_mops[i] != lr->lr_mops[i-1] || !BV_CASEMATCH( lr->lr_btype+i, &bv )) {
#  541|   			bvl[k++] = NULL;
#  542|   			bv = lr->lr_btype[i];

Error: GCC_ANALYZER_WARNING (CWE-476): [#def149]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c: scope_hint: In function ‘parse_ldif_control’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldifutil.c:709:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ppctrls’
#  707|   	newctrl = NULL;
#  708|   	pctrls[i+1] = NULL;
#  709|-> 	*ppctrls = pctrls;
#  710|   
#  711|   cleanup:

Error: CPPCHECK_WARNING: [#def150]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/modify.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def151]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/modify.c:206:2: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
#  204|   		return -1;
#  205|   
#  206|-> 	return msgid;
#  207|   }
#  208|   

Error: CLANG_WARNING: [#def152]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/modify.c:222:7: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  220|   		return( rc );
#  221|   
#  222|-> 	if ( ldap_result( ld, msgid, LDAP_MSG_ALL, (struct timeval *) NULL, &res ) == -1 || !res )
#  223|   		return( ld->ld_errno );
#  224|   

Error: CPPCHECK_WARNING: [#def153]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/modrdn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def154]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/modrdn.c:189:2: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
#  187|   		deleteoldrdn, NULL, NULL, &msgid );
#  188|   
#  189|-> 	return rc == LDAP_SUCCESS ? msgid : -1;
#  190|   }
#  191|   

Error: CLANG_WARNING: [#def155]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/modrdn.c:241:7: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  239|   	}
#  240|   
#  241|-> 	rc = ldap_result( ld, msgid, LDAP_MSG_ALL, NULL, &res );
#  242|   
#  243|   	if( rc == -1 || !res ) {

Error: CPPCHECK_WARNING: [#def156]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/msctrl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def157]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/msctrl.c: scope_hint: In function ‘ldap_parse_dirsync_control’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/msctrl.c:125:25: warning[-Wunused-variable]: unused variable ‘len’
#  125 |         ber_len_t       len;
#      |                         ^~~
#  123|   	BerElement	*ber;
#  124|   	ber_tag_t	tag;
#  125|-> 	ber_len_t	len;
#  126|   	int unused;
#  127|   

Error: CPPCHECK_WARNING: [#def158]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/open.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def159]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/options.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def160]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/options.c:621:10: warning[core.NullDereference]: Access to field 'ldc' results in a dereference of a null pointer (loaded from variable 'ld')
#  619|   			rc = LDAP_OPT_SUCCESS;
#  620|   			if( source_ip == NULL ) {
#  621|-> 				if ( ld->ld_options.ldo_local_ip_addrs.local_ip_addrs ) {
#  622|   					LDAP_FREE( ld->ld_options.ldo_local_ip_addrs.local_ip_addrs );
#  623|   					memset( &ld->ld_options.ldo_local_ip_addrs, 0,

Error: CPPCHECK_WARNING: [#def161]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/os-ip.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-666): [#def162]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/os-ip.c: scope_hint: In function ‘ldap_pvt_connect’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/os-ip.c:450:22: warning[-Wanalyzer-fd-phase-mismatch]: ‘connect’ on file descriptor ‘s’ in wrong phase
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/os-ip.c:43: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldap-int.h:84:11: note: in expansion of macro ‘ldap_debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldap-int.h:102:19: note: in expansion of macro ‘DebugTest’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/os-ip.c:441:9: note: in expansion of macro ‘Debug3’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/os-ip.c:441:9: note: in expansion of macro ‘Debug3’
#  448|   	do{
#  449|   		Debug0(LDAP_DEBUG_TRACE, "attempting to connect: \n" );
#  450|-> 		if ( connect(s, sin, addrlen) != AC_SOCKET_ERROR ) {
#  451|   			Debug0(LDAP_DEBUG_TRACE, "connect success\n" );
#  452|   

Error: CPPCHECK_WARNING: [#def163]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/os-local.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-252): [#def164]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/os-local.c: scope_hint: In function ‘ldap_pvt_is_socket_ready’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/os-local.c:139:23: warning[-Wunused-result]: ignoring return value of ‘read’ declared with attribute ‘warn_unused_result’
#  139 |                 (void)read(s, &ch, 1);
#      |                       ^~~~~~~~~~~~~~~
#  137|   	{
#  138|   		/* XXX: needs to be replace with ber_stream_read() */
#  139|-> 		(void)read(s, &ch, 1);
#  140|   		TRACE;
#  141|   		return -1;

Error: CPPCHECK_WARNING: [#def165]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/pagectrl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def166]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/passwd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def167]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/psearchctrl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def168]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/psearchctrl.c: scope_hint: In function ‘ldap_create_persistentsearch_control_value’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/psearchctrl.c:80:25: warning[-Wunused-variable]: unused variable ‘i’
#   80 |         int             i;
#      |                         ^
#   78|   	struct berval *value )
#   79|   {
#   80|-> 	int		i;
#   81|   	BerElement	*ber = NULL;
#   82|   	ber_tag_t	tag;

Error: COMPILER_WARNING (CWE-563): [#def169]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/psearchctrl.c: scope_hint: In function ‘ldap_parse_entrychange_control’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/psearchctrl.c:259:24: warning[-Wunused-variable]: unused variable ‘berTag’
#  259 |         ber_tag_t tag, berTag;
#      |                        ^~~~~~
#  257|   {
#  258|   	BerElement *ber;
#  259|-> 	ber_tag_t tag, berTag;
#  260|   	ber_len_t berLen;
#  261|   	ber_int_t chgtype;

Error: CPPCHECK_WARNING: [#def170]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/request.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def171]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/request.c: scope_hint: In function ‘ldap_send_server_request’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/request.c:387:38: warning[-Wunused-but-set-variable]: variable ‘rtag’ set but not used
#  387 |                 ber_tag_t       tag, rtag;
#      |                                      ^~~~
#  385|   		BerElement tmpber = *ber;
#  386|   		ber_int_t	bint;
#  387|-> 		ber_tag_t	tag, rtag;
#  388|   
#  389|   		ber_reset( &tmpber, 1 );

Error: CLANG_WARNING: [#def172]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/request.c:390:3: warning[deadcode.DeadStores]: Value stored to 'rtag' is never read
#  388|   
#  389|   		ber_reset( &tmpber, 1 );
#  390|-> 		rtag = ber_scanf( &tmpber, "{it", /*}*/ &bint, &tag );
#  391|   		switch ( tag ) {
#  392|   		case LDAP_REQ_BIND:

Error: CLANG_WARNING: [#def173]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/request.c:393:4: warning[deadcode.DeadStores]: Value stored to 'rtag' is never read
#  391|   		switch ( tag ) {
#  392|   		case LDAP_REQ_BIND:
#  393|-> 			rtag = ber_scanf( &tmpber, "{i" /*}*/, &bint );
#  394|   			break;
#  395|   		case LDAP_REQ_DELETE:

Error: CLANG_WARNING: [#def174]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/request.c:398:4: warning[deadcode.DeadStores]: Value stored to 'rtag' is never read
#  396|   			break;
#  397|   		default:
#  398|-> 			rtag = ber_scanf( &tmpber, "{" /*}*/ );
#  399|   		case LDAP_REQ_ABANDON:
#  400|   			break;

Error: CPPCHECK_WARNING: [#def175]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/result.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def176]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/result.c: scope_hint: In function ‘try_read1msg’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/result.c:662:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘lr’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/result.c:53: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/result.c:65: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldap-int.h:84:11: note: in expansion of macro ‘ldap_debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldap-int.h:102:19: note: in expansion of macro ‘DebugTest’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/result.c:473:9: note: in expansion of macro ‘Debug3’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/errno.h:21: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/result.c:59: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/result.c:489:9: note: in expansion of macro ‘sock_errset’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldap-int.h:84:11: note: in expansion of macro ‘ldap_debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/ldap-int.h:102:19: note: in expansion of macro ‘DebugTest’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/result.c:620:9: note: in expansion of macro ‘Debug3’
#  660|   	}
#  661|   
#  662|-> 	id = lr->lr_origid;
#  663|   	refer_cnt = 0;
#  664|   	hadref = simple_request = 0;

Error: COMPILER_WARNING (CWE-457): [#def177]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/result.c:662:16: warning[-Wmaybe-uninitialized]: ‘lr’ may be used uninitialized
#  662 |         id = lr->lr_origid;
#      |              ~~^~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/result.c: scope_hint: In function ‘wait4msg’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/result.c:456:26: note: ‘lr’ was declared here
#  456 |         LDAPRequest     *lr, *tmplr, dummy_lr = { 0 };
#      |                          ^~
#  660|   	}
#  661|   
#  662|-> 	id = lr->lr_origid;
#  663|   	refer_cnt = 0;
#  664|   	hadref = simple_request = 0;

Error: CPPCHECK_WARNING: [#def178]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/rq.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def179]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sasl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def180]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sasl.c:210:7: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  208|   #endif
#  209|   
#  210|-> 	if ( ldap_result( ld, msgid, LDAP_MSG_ALL, NULL, &result ) == -1 || !result ) {
#  211|   		return( ld->ld_errno );	/* ldap_result sets ld_errno */
#  212|   	}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def181]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sasl.c: scope_hint: In function ‘ldap_sasl_bind_s’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sasl.c:210:14: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘msgid’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sasl.c:35: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sasl.c:152:17: note: in expansion of macro ‘LDAP_VALID’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sasl.c:45: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sasl.c:205:13: note: in expansion of macro ‘LDAP_IS_UDP’
#  208|   #endif
#  209|   
#  210|-> 	if ( ldap_result( ld, msgid, LDAP_MSG_ALL, NULL, &result ) == -1 || !result ) {
#  211|   		return( ld->ld_errno );	/* ldap_result sets ld_errno */
#  212|   	}

Error: CLANG_WARNING: [#def182]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sasl.c:536:8: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  534|   #endif
#  535|   
#  536|-> 		if ( ldap_result( ld, msgid, LDAP_MSG_ALL, NULL, &result ) == -1 || !result ) {
#  537|   			return( ld->ld_errno );	/* ldap_result sets ld_errno */
#  538|   		}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def183]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sasl.c: scope_hint: In function ‘ldap_sasl_interactive_bind_s’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sasl.c:536:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘msgid’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sasl.c:531:21: note: in expansion of macro ‘LDAP_IS_UDP’
#  534|   #endif
#  535|   
#  536|-> 		if ( ldap_result( ld, msgid, LDAP_MSG_ALL, NULL, &result ) == -1 || !result ) {
#  537|   			return( ld->ld_errno );	/* ldap_result sets ld_errno */
#  538|   		}

Error: CPPCHECK_WARNING: [#def184]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/schema.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def185]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/schema.c: scope_hint: In function ‘append_to_safe_string.isra.0’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/schema.c:191:9: warning[-Wstringop-truncation]: ‘strncpy’ output truncated before terminating nul copying as many bytes from a string as its length
#  191 |         strncpy(&ss->val[ss->pos], s, l);
#      |         ^
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/schema.c:166:17: note: length computed here
#  166 |         int l = strlen(s);
#      |                 ^~~~~~~~~
#  189|   		ss->val = temp;
#  190|   	}
#  191|-> 	strncpy(&ss->val[ss->pos], s, l);
#  192|   	ss->pos += l;
#  193|   	if ( ss->pos > 0 && LDAP_SPACE(ss->val[ss->pos-1]) )

Error: CLANG_WARNING: [#def186]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/schema.c:2280:5: warning[deadcode.DeadStores]: Value stored to 'savepos' is never read
# 2278|   				seen_syntax = 1;
# 2279|   				parse_whsp(&ss);
# 2280|-> 				savepos = ss;
# 2281|   				at->at_syntax_oid =
# 2282|   					parse_noidlen(&ss,

Error: COMPILER_WARNING (CWE-563): [#def187]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/schema.c: scope_hint: In function ‘ldap_str2structurerule’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/schema.c:3000:22: warning[-Wunused-but-set-variable]: variable ‘savepos’ set but not used
# 3000 |         const char * savepos;
#      |                      ^~~~~~~
# 2998|   	LDAPStructureRule * sr;
# 2999|   	char ** ext_vals;
# 3000|-> 	const char * savepos;
# 3001|   
# 3002|   	if ( !s ) {

Error: CLANG_WARNING: [#def188]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/schema.c:3028:2: warning[deadcode.DeadStores]: Value stored to 'savepos' is never read
# 3026|   	 */
# 3027|   	parse_whsp(&ss);
# 3028|-> 	savepos = ss;
# 3029|   	ret = ldap_int_parse_ruleid(&ss,code,0,&sr->sr_ruleid);
# 3030|   	if ( ret ) {

Error: COMPILER_WARNING (CWE-563): [#def189]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/schema.c: scope_hint: In function ‘ldap_str2nameform’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/schema.c:3186:22: warning[-Wunused-but-set-variable]: variable ‘savepos’ set but not used
# 3186 |         const char * savepos;
#      |                      ^~~~~~~
# 3184|   	LDAPNameForm * nf;
# 3185|   	char ** ext_vals;
# 3186|-> 	const char * savepos;
# 3187|   
# 3188|   	if ( !s ) {

Error: CLANG_WARNING: [#def190]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/schema.c:3218:2: warning[deadcode.DeadStores]: Value stored to 'savepos' is never read
# 3216|   	 */
# 3217|   	parse_whsp(&ss);
# 3218|-> 	savepos = ss;
# 3219|   	nf->nf_oid = ldap_int_parse_numericoid(&ss,code,0);
# 3220|   	if ( !nf->nf_oid ) {

Error: CPPCHECK_WARNING: [#def191]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/search.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def192]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/search.c:181:7: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  179|   	}
#  180|   
#  181|-> 	rc = ldap_result( ld, msgid, LDAP_MSG_ALL, timeout, res );
#  182|   
#  183|   	if( rc <= 0 ) {

Error: CLANG_WARNING: [#def193]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/search.c:310:6: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  308|   		struct sockaddr_storage sa = {0};
#  309|   		/* dummy, filled with ldo_peer in request.c */
#  310|-> 	    err = ber_write( ber, (char *) &sa, sizeof( sa ), 0 );
#  311|   	}
#  312|   	if ( LDAP_IS_UDP(ld) && ld->ld_options.ldo_version == LDAP_VERSION2) {

Error: CPPCHECK_WARNING: [#def194]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sort.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def195]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/sortctrl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def196]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/stctrl.c:217:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
#  215|   
#  216|   	if ( len == 0 ) {
#  217|-> 		tag = ber_skip_tag( ber, &len );
#  218|   
#  219|   	} else {

Error: CLANG_WARNING: [#def197]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/stctrl.c:224:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
#  222|   			 * but we're liberal in what we accept */
#  223|   		}
#  224|-> 		tag = ber_scanf( ber, "o", ip );
#  225|   	}
#  226|   

Error: CLANG_WARNING: [#def198]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/stctrl.c:235:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
#  233|   
#  234|   	if ( len == 0 ) {
#  235|-> 		tag = ber_skip_tag( ber, &len );
#  236|   
#  237|   	} else {

Error: CLANG_WARNING: [#def199]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/stctrl.c:242:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
#  240|   			 * but we're liberal in what we accept */
#  241|   		}
#  242|-> 		tag = ber_scanf( ber, "o", name );
#  243|   	}
#  244|   

Error: CLANG_WARNING: [#def200]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/stctrl.c:261:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
#  259|   			 * but we're liberal in what we accept */
#  260|   		}
#  261|-> 		tag = ber_scanf( ber, "o", oid );
#  262|   	}
#  263|   

Error: CLANG_WARNING: [#def201]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/stctrl.c:274:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
#  272|   
#  273|   	if ( len == 0 ) {
#  274|-> 		tag = ber_skip_tag( ber, &len );
#  275|   
#  276|   	} else {

Error: CLANG_WARNING: [#def202]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/stctrl.c:283:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
#  281|   		}
#  282|   #endif
#  283|-> 		tag = ber_scanf( ber, "o", id );
#  284|   	}
#  285|   

Error: CPPCHECK_WARNING: [#def203]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tavl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def204]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tavl.c:410:4: warning[deadcode.DeadStores]: Value stored to 'p' is never read
#  408|   			}
#  409|   			/* end case 3 */
#  410|-> 			p = q;
#  411|   		}
#  412|   		if ( !depth )

Error: CPPCHECK_WARNING: [#def205]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def206]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c: scope_hint: In function ‘get_modlist’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:82:17: warning[-Wanalyzer-malloc-leak]: leak of ‘get_list(prompt3)’
#   80|   	result = (char **) 0;
#   81|   	while ( 1 ) {
#   82|-> 		get_line( buf, sizeof(buf), stdin, prompt );
#   83|   
#   84|   		if ( *buf == '\0' )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def207]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:82:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(&buf)’
#   80|   	result = (char **) 0;
#   81|   	while ( 1 ) {
#   82|-> 		get_line( buf, sizeof(buf), stdin, prompt );
#   83|   
#   84|   		if ( *buf == '\0' )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def208]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c: scope_hint: In function ‘get_list’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:88:44: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
#   86|   
#   87|   		if ( result == (char **) 0 )
#   88|-> 			result = (char **) malloc( sizeof(char *) );
#   89|   		else
#   90|   			result = (char **) realloc( result,

Error: CPPCHECK_WARNING (CWE-401): [#def209]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:90: error[memleakOnRealloc]: Common realloc mistake: 'result' nulled but not freed upon failure
#   88|   			result = (char **) malloc( sizeof(char *) );
#   89|   		else
#   90|-> 			result = (char **) realloc( result,
#   91|   			    sizeof(char *) * (num + 1) );
#   92|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def210]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:90:44: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#   88|   			result = (char **) malloc( sizeof(char *) );
#   89|   		else
#   90|-> 			result = (char **) realloc( result,
#   91|   			    sizeof(char *) * (num + 1) );
#   92|   

Error: GCC_ANALYZER_WARNING (CWE-122): [#def211]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:93:31: warning[-Wanalyzer-out-of-bounds]: heap-based buffer overflow
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:93:31: note: write of 8 bytes to beyond the end of the region
#   91|   			    sizeof(char *) * (num + 1) );
#   92|   
#   93|-> 		result[num++] = (char *) strdup( buf );
#   94|   	}
#   95|   	if ( result == (char **) 0 )

Error: GCC_ANALYZER_WARNING (CWE-476): [#def212]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:93:31: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’
#   91|   			    sizeof(char *) * (num + 1) );
#   92|   
#   93|-> 		result[num++] = (char *) strdup( buf );
#   94|   	}
#   95|   	if ( result == (char **) 0 )

Error: GCC_ANALYZER_WARNING (CWE-401): [#def213]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:95:12: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
#   93|   		result[num++] = (char *) strdup( buf );
#   94|   	}
#   95|-> 	if ( result == (char **) 0 )
#   96|   		return( NULL );
#   97|   	result = (char **) realloc( result, sizeof(char *) * (num + 1) );

Error: CPPCHECK_WARNING (CWE-401): [#def214]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:97: error[memleakOnRealloc]: Common realloc mistake: 'result' nulled but not freed upon failure
#   95|   	if ( result == (char **) 0 )
#   96|   		return( NULL );
#   97|-> 	result = (char **) realloc( result, sizeof(char *) * (num + 1) );
#   98|   	result[num] = NULL;
#   99|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def215]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:98:15: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#   96|   		return( NULL );
#   97|   	result = (char **) realloc( result, sizeof(char *) * (num + 1) );
#   98|-> 	result[num] = NULL;
#   99|   
#  100|   	return( result );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def216]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:98:21: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
#   96|   		return( NULL );
#   97|   	result = (char **) realloc( result, sizeof(char *) * (num + 1) );
#   98|-> 	result[num] = NULL;
#   99|   
#  100|   	return( result );

Error: COMPILER_WARNING (CWE-563): [#def217]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c: scope_hint: In function ‘file_read’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:123:25: warning[-Wunused-but-set-variable]: variable ‘eof’ set but not used
#  123 |         int             eof;
#      |                         ^~~
#  121|   	FILE		*fp;
#  122|   	ber_slen_t	rlen;
#  123|-> 	int		eof;
#  124|   
#  125|   	if (( fp = fopen( path, "r" )) == NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def218]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c: scope_hint: In function ‘file_read’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:136:20: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bv’
#  134|   	}
#  135|   
#  136|-> 	bv->bv_len = ftell( fp );
#  137|   
#  138|   	if (( bv->bv_val = (char *)malloc( bv->bv_len )) == NULL ) {

Error: CLANG_WARNING: [#def219]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:151:2: warning[deadcode.DeadStores]: Value stored to 'eof' is never read
#  149|   
#  150|   	rlen = fread( bv->bv_val, 1, bv->bv_len, fp );
#  151|-> 	eof = feof( fp );
#  152|   	fclose( fp );
#  153|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def220]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c: scope_hint: In function ‘get_modlist’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:197:52: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
#  195|   			int	i;
#  196|   
#  197|-> 			for ( i = 0; tmp.mod_values[i] != NULL; ++i )
#  198|   				;
#  199|   			bvals = (struct berval **)calloc( i + 1,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def221]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:201:56: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  199|   			bvals = (struct berval **)calloc( i + 1,
#  200|   			    sizeof( struct berval *));
#  201|-> 			for ( i = 0; tmp.mod_values[i] != NULL; ++i ) {
#  202|   				bvals[i] = (struct berval *)malloc(
#  203|   				    sizeof( struct berval ));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def222]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:202:42: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘bvals’
#  200|   			    sizeof( struct berval *));
#  201|   			for ( i = 0; tmp.mod_values[i] != NULL; ++i ) {
#  202|-> 				bvals[i] = (struct berval *)malloc(
#  203|   				    sizeof( struct berval ));
#  204|   				if ( strncmp( tmp.mod_values[i], "{FILE}",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def223]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:206:44: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  204|   				if ( strncmp( tmp.mod_values[i], "{FILE}",
#  205|   				    6 ) == 0 ) {
#  206|-> 					if ( file_read( tmp.mod_values[i] + 6,
#  207|   					    bvals[i] ) < 0 ) {
#  208|   						free( bvals );

Error: CLANG_WARNING: [#def224]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:208:7: warning[unix.Malloc]: Potential leak of memory pointed to by 'tmp.mod_type'
#  206|   					if ( file_read( tmp.mod_values[i] + 6,
#  207|   					    bvals[i] ) < 0 ) {
#  208|-> 						free( bvals );
#  209|   						for ( i = 0; i<num; i++ )
#  210|   							free( result[ i ] );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def225]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:208:49: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  206|   					if ( file_read( tmp.mod_values[i] + 6,
#  207|   					    bvals[i] ) < 0 ) {
#  208|-> 						free( bvals );
#  209|   						for ( i = 0; i<num; i++ )
#  210|   							free( result[ i ] );

Error: CPPCHECK_WARNING (CWE-401): [#def226]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:212: error[memleak]: Memory leak: tmp.mod_type
#  210|   							free( result[ i ] );
#  211|   						free( result );
#  212|-> 						return( NULL );
#  213|   					}
#  214|   				} else {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def227]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:212:55: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
#  210|   							free( result[ i ] );
#  211|   						free( result );
#  212|-> 						return( NULL );
#  213|   					}
#  214|   				} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def228]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:215:58: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(16)’
#  213|   					}
#  214|   				} else {
#  215|-> 					bvals[i]->bv_val = tmp.mod_values[i];
#  216|   					bvals[i]->bv_len =
#  217|   					    strlen( tmp.mod_values[i] );

Error: CLANG_WARNING: [#def229]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:221:15: warning[unix.Malloc]: Potential leak of memory pointed to by 'tmp.mod_vals.modv_strvals'
#  219|   			}
#  220|   			tmp.mod_bvalues = bvals;
#  221|-> 			tmp.mod_op |= LDAP_MOD_BVALUES;
#  222|   		}
#  223|   

Error: CPPCHECK_WARNING (CWE-401): [#def230]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:227: error[memleakOnRealloc]: Common realloc mistake: 'result' nulled but not freed upon failure
#  225|   			result = (LDAPMod **) malloc( sizeof(LDAPMod *) );
#  226|   		else
#  227|-> 			result = (LDAPMod **) realloc( result,
#  228|   			    sizeof(LDAPMod *) * (num + 1) );
#  229|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def231]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:230:29: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘result’
#  228|   			    sizeof(LDAPMod *) * (num + 1) );
#  229|   
#  230|-> 		result[num] = (LDAPMod *) malloc( sizeof(LDAPMod) );
#  231|   		*(result[num]) = tmp;	/* struct copy */
#  232|   		num++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def232]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:231:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc(24)’
#  229|   
#  230|   		result[num] = (LDAPMod *) malloc( sizeof(LDAPMod) );
#  231|-> 		*(result[num]) = tmp;	/* struct copy */
#  232|   		num++;
#  233|   	}

Error: CPPCHECK_WARNING (CWE-401): [#def233]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:236: error[memleakOnRealloc]: Common realloc mistake: 'result' nulled but not freed upon failure
#  234|   	if ( result == NULL )
#  235|   		return( NULL );
#  236|-> 	result = (LDAPMod **) realloc( result, sizeof(LDAPMod *) * (num + 1) );
#  237|   	result[num] = NULL;
#  238|   

Error: COMPILER_WARNING (CWE-563): [#def234]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c: scope_hint: In function ‘main’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:282:25: warning[-Wunused-but-set-variable]: variable ‘bound’ set but not used
#  282 |         int             bound, all, scope, attrsonly;
#      |                         ^~~~~
#  280|   	static const char usage[] =
#  281|   		"usage: %s [-u] [-h host] [-d level] [-s dnsuffix] [-p port] [-t file] [-T file]\n";
#  282|-> 	int		bound, all, scope, attrsonly;
#  283|   	LDAPMessage	*res;
#  284|   	LDAPMod		**mods, **attrs;

Error: CLANG_WARNING: [#def235]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:366:2: warning[deadcode.DeadStores]: Value stored to 'bound' is never read
#  364|   	}
#  365|   
#  366|-> 	bound = 0;
#  367|   	timeout.tv_sec = 0;
#  368|   	timeout.tv_usec = 0;

Error: CLANG_WARNING: [#def236]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:421:5: warning[deadcode.DeadStores]: Value stored to 'bound' is never read
#  419|   			} else {
#  420|   				printf( "Bind initiated\n" );
#  421|-> 				bound = 1;
#  422|   			}
#  423|   			break;

Error: CLANG_WARNING: [#def237]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/test.c:442:5: warning[deadcode.DeadStores]: Value stored to 'bound' is never read
#  440|   			} else {
#  441|   				printf( "Bind successful\n" );
#  442|-> 				bound = 1;
#  443|   			}
#  444|   			break;

Error: COMPILER_WARNING (CWE-563): [#def238]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/threads.c: scope_hint: In function ‘ldap_pvt_thread_initialize’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/threads.c:45:27: warning[-Wunused-but-set-variable]: variable ‘tid’ set but not used
#   45 |         ldap_pvt_thread_t tid;
#      |                           ^~~
#   43|   	int rc;
#   44|   	static int init = 0;
#   45|-> 	ldap_pvt_thread_t tid;
#   46|   
#   47|   	/* we only get one shot at this */

Error: CLANG_WARNING: [#def239]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/threads.c:59:2: warning[deadcode.DeadStores]: Value stored to 'tid' is never read
#   57|   
#   58|   	/* kludge to pull symbol definitions in */
#   59|-> 	tid = ldap_pvt_thread_self();
#   60|   	return 0;
#   61|   }

Error: CPPCHECK_WARNING: [#def240]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tls2.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def241]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tls2.c: scope_hint: In function ‘ldap_int_tls_start’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tls2.c:1111:15: warning[-Wunused-variable]: unused variable ‘ssl’
# 1111 |         void *ssl;
#      |               ^~~
# 1109|   	Sockbuf *sb;
# 1110|   	char *host;
# 1111|-> 	void *ssl;
# 1112|   	int ret, async;
# 1113|   	struct timeval start_time_tv, tv, tv0;

Error: CLANG_WARNING: [#def242]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tls2.c:1183:42: warning[core.UndefinedBinaryOperatorResult]: The right operand of '-' is a garbage value
# 1181|   
# 1182|   			/* delta = curr - start */
# 1183|-> 			delta_tv.tv_sec = curr_time_tv.tv_sec - start_time_tv.tv_sec;
# 1184|   			delta_tv.tv_usec = curr_time_tv.tv_usec - start_time_tv.tv_usec;
# 1185|   			if ( delta_tv.tv_usec < 0 ) {

Error: CLANG_WARNING: [#def243]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tls2.c:1530:4: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
# 1528|   			if ( rdn_end > dn_end )
# 1529|   				return LDAP_DECODING_ERROR;
# 1530|-> 			tag = ber_skip_tag( ber, &len );
# 1531|   			ber_skip_data( ber, len );
# 1532|   			navas++;

Error: CLANG_WARNING: [#def244]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tls2.c:1567:4: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
# 1565|   
# 1566|   			*newRDN++ = newAVA;
# 1567|-> 			tag = ber_skip_tag( ber, &len );
# 1568|   			tag = ber_get_stringbv( ber, &Oid, LBER_BV_NOTERM );
# 1569|   			if ( tag != LBER_TAG_OID ) {

Error: CLANG_WARNING: [#def245]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tls2.c:1665:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
# 1663|   		}
# 1664|   		*newRDN++ = NULL;
# 1665|-> 		tag = ber_next_element( ber, &len, dn_end );
# 1666|   	}
# 1667|   		

Error: CPPCHECK_WARNING: [#def246]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tls_o.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def247]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tls_o.c: scope_hint: In function ‘tlso_ctx_cipher13’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tls_o.c:313:13: warning[-Wunused-variable]: unused variable ‘ret’
#  313 |         int ret;
#      |             ^~~
#  311|   	STACK_OF(SSL_CIPHER) *cs;
#  312|   	SSL *s = SSL_new( ctx );
#  313|-> 	int ret;
#  314|   
#  315|   	*oldsuites = NULL;

Error: CPPCHECK_WARNING: [#def248]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tpool.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def249]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tpool.c:819:3: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
#  817|   
#  818|   	if ( rc == 0 ) {
#  819|-> 		return count;
#  820|   	}
#  821|   

Error: CPPCHECK_WARNING (CWE-823): [#def250]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/tpool.c:1396: error[arrayIndexOutOfBounds]: Array 'ctx->ltu_key[32]' accessed at index 32, which is out of bounds.
# 1394|   	if ( olddatap ) {
# 1395|   		if ( found ) {
# 1396|-> 			*olddatap = ctx->ltu_key[i].ltk_data;
# 1397|   		} else {
# 1398|   			*olddatap = NULL;

Error: CPPCHECK_WARNING: [#def251]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/unbind.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def252]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/url.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def253]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/urltest.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def254]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/utf-8-conv.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def255]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/utf-8.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def256]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/vc.c:169:6: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
#  167|   				if (tag == LBER_BOOLEAN) {
#  168|   					ber_int_t crit;
#  169|-> 					tag = ber_scanf(ber, "b", &crit);
#  170|   					tctrl->ldctl_iscritical = crit ? (char) 0 : (char) ~0;
#  171|   				    tag = ber_peek_tag(ber, &len);

Error: CLANG_WARNING: [#def257]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/vc.c:175:21: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
#  173|   
#  174|   			    if (tag == LBER_OCTETSTRING) {
#  175|->                     tag = ber_scanf( ber, "o", &tctrl->ldctl_value );
#  176|                   } else {
#  177|                       BER_BVZERO( &tctrl->ldctl_value );

Error: CLANG_WARNING: [#def258]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/vc.c:254:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  252|   		LDAPControl *const *c;
#  253|   
#  254|-> 		rc = ber_printf(ber, "t{" /*"}"*/, LDAP_TAG_EXOP_VERIFY_CREDENTIALS_CONTROLS);
#  255|   
#  256|   		for (c=vcctrls; *c; c++) {

Error: COMPILER_WARNING: [#def259]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def260]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: libldap.la 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def261]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/libldap/vlvctrl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def262]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblmdb/midl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-401): [#def263]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblmdb/midl.c:135: error[memleakOnRealloc]: Common realloc mistake: 'idn' nulled but not freed upon failure
#  133|   	MDB_IDL idn = *idp-1;
#  134|   	/* grow it */
#  135|-> 	idn = realloc(idn, (*idn + num + 2) * sizeof(MDB_ID));
#  136|   	if (!idn)
#  137|   		return ENOMEM;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def264]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblmdb/midl.c: scope_hint: In function ‘mdb_midl_append’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblmdb/midl.c:167:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  165|   	}
#  166|   	ids[0]++;
#  167|-> 	ids[ids[0]] = id;
#  168|   	return 0;
#  169|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def265]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblmdb/midl.c: scope_hint: In function ‘mdb_midl_append_list’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblmdb/midl.c:181:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  179|   	}
#  180|   	memcpy(&ids[ids[0]+1], &app[1], app[0] * sizeof(MDB_ID));
#  181|-> 	ids[0] += app[0];
#  182|   	return 0;
#  183|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def266]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblmdb/midl.c: scope_hint: In function ‘mdb_midl_append_range’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblmdb/midl.c:196:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  194|   	ids[0] = len + n;
#  195|   	ids += len;
#  196|-> 	while (n)
#  197|   		ids[n--] = id++;
#  198|   	return 0;

Error: CPPCHECK_WARNING: [#def267]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ucdata/ucdata.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def268]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ucstr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def269]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ucstr.c: scope_hint: In function ‘UTF8bvnormalize’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ucstr.c:111:58: warning[-Wunused-but-set-variable]: variable ‘last’ set but not used
#  111 |         int i, j, len, clen, outpos, ucsoutlen, outsize, last;
#      |                                                          ^~~~
#  109|   	void *ctx )
#  110|   {
#  111|-> 	int i, j, len, clen, outpos, ucsoutlen, outsize, last;
#  112|   	int didnewbv = 0;
#  113|   	char *out, *outtmp, *s;

Error: CLANG_WARNING: [#def270]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ucstr.c:285:3: warning[deadcode.DeadStores]: Value stored to 'last' is never read
#  283|   		}
#  284|   
#  285|-> 		last = i;
#  286|   
#  287|   		/* Allocate more space in out if necessary */

Error: CPPCHECK_WARNING: [#def271]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ure/ure.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def272]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ure/ure.c: scope_hint: In function ‘_ure_add_range’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ure/ure.c:526:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘rp’
#  524|   
#  525|       ccl->ranges_used++;
#  526|->     rp->min_code = r->min_code;
#  527|       rp->max_code = r->max_code;
#  528|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def273]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ure/ure.c: scope_hint: In function ‘_ure_compile_symbol’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ure/ure.c:1017:27: warning[-Wanalyzer-malloc-leak]: leak of ‘symbol.sym.ccl.ranges’
# 1015|   
# 1016|           if (0xdc00 <= *sp && *sp <= 0xdfff) {
# 1017|->             symp->sym.chr = 0x10000 + (((symp->sym.chr & 0x03ff) << 10) |
# 1018|                                          (*sp & 0x03ff));
# 1019|               sp++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def274]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ure/ure.c: scope_hint: In function ‘_ure_make_symbol’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ure/ure.c:1103:28: warning[-Wanalyzer-malloc-leak]: leak of ‘symbol.sym.ccl.ranges’
# 1101|             free((char *) symbol.sym.ccl.ranges);
# 1102|   
# 1103|->         return b->symtab[i].id;
# 1104|       }
# 1105|   

Error: CPPCHECK_WARNING (CWE-758): [#def275]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ure/ure.c:1859: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 1857|                     fprintf(out, "\\p");
# 1858|                   for (k = h = 0; k < 32; k++) {
# 1859|->                     if (sym->props & (1 << k)) {
# 1860|                           if (h != 0)
# 1861|                             putc(',', out);

Error: CLANG_WARNING: [#def276]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ure/ure.c:1978:18: warning[deadcode.DeadStores]: Although the value stored to 'skip' is used in the enclosing expression, the value is never actually read from 'skip'
# 1976|       stp = dfa->states;
# 1977|   
# 1978|->     for (found = skip = 0; found == 0 && sp < ep; ) {
# 1979|           lp = sp;
# 1980|           c = *sp++;

Error: CPPCHECK_WARNING (CWE-758): [#def277]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/ure/urestubs.c:120: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  118|   
#  119|   	for( i=0; i<32; i++ ) {
#  120|-> 		if( props & (1 << i) ) {
#  121|   			mask1 |= masks[i].mask1;
#  122|   			mask2 |= masks[i].mask2;

Error: COMPILER_WARNING: [#def278]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def279]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblunicode/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: liblunicode.a 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def280]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/base64.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def281]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/getpass.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def282]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/getpass.c:117:3: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  115|   		fprintf(stderr, "\n"); 
#  116|   		fflush(stderr);
#  117|-> 		SETFLAGS( ttyb, flags );
#  118|   		if (SETATTR(fileno(fi), &ttyb) < 0)
#  119|   			perror("SETATTR");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def283]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/getpass.c: scope_hint: In function ‘lutil_getpass’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/getpass.c:125:23: warning[-Wanalyzer-file-leak]: leak of FILE ‘fi’
#  123|   #endif
#  124|   	if ( c == EOF )
#  125|-> 		return( NULL );
#  126|   	pbuf[i] = '\0';
#  127|   	return (pbuf);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def284]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/getpass.c:125:23: warning[-Wanalyzer-malloc-leak]: leak of ‘fi’
#  123|   #endif
#  124|   	if ( c == EOF )
#  125|-> 		return( NULL );
#  126|   	pbuf[i] = '\0';
#  127|   	return (pbuf);

Error: COMPILER_WARNING: [#def285]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/hash.c:69:33: warning[-Warray-parameter=]: argument 1 of type ‘unsigned char *’ declared as a pointer
#   69 | lutil_HASHFinal( unsigned char *digest, lutil_HASH_CTX *ctx )
#      |                  ~~~~~~~~~~~~~~~^~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1189: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/hash.c:22: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lutil_hash.h:52:23: note: previously declared as an array ‘unsigned char[4]’
#   52 |         unsigned char digest[LUTIL_HASH_BYTES],
#      |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#   67|    */
#   68|   void
#   69|-> lutil_HASHFinal( unsigned char *digest, lutil_HASH_CTX *ctx )
#   70|   {
#   71|   	ber_uint_t h = ctx->hash;

Error: COMPILER_WARNING: [#def286]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/hash.c:128:35: warning[-Warray-parameter=]: argument 1 of type ‘unsigned char *’ declared as a pointer
#  128 | lutil_HASH64Final( unsigned char *digest, lutil_HASH_CTX *ctx )
#      |                    ~~~~~~~~~~~~~~~^~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lutil_hash.h:71:23: note: previously declared as an array ‘unsigned char[8]’
#   71 |         unsigned char digest[LUTIL_HASH64_BYTES],
#      |         ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  126|    */
#  127|   void
#  128|-> lutil_HASH64Final( unsigned char *digest, lutil_HASH_CTX *ctx )
#  129|   {
#  130|   	unsigned long long h = ctx->hash64;

Error: COMPILER_WARNING: [#def287]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/md5.c:150:32: warning[-Warray-parameter=]: argument 1 of type ‘unsigned char *’ declared as a pointer
#  150 | lutil_MD5Final( unsigned char *digest, struct lutil_MD5Context *ctx )
#      |                 ~~~~~~~~~~~~~~~^~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1189: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/md5.c:46: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lutil_md5.h:49:23: note: previously declared as an array ‘unsigned char[16]’
#   49 |         unsigned char digest[16],
#      |         ~~~~~~~~~~~~~~^~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  148|    */
#  149|   void
#  150|-> lutil_MD5Final( unsigned char *digest, struct lutil_MD5Context *ctx )
#  151|   {
#  152|   	unsigned count;

Error: COMPILER_WARNING: [#def288]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/md5.c:211:33: warning[-Warray-parameter=]: argument 1 of type ‘ber_uint_t *’ {aka ‘unsigned int *’} declared as a pointer
#  211 | lutil_MD5Transform( ber_uint_t *buf, const unsigned char *inraw )
#      |                     ~~~~~~~~~~~~^~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lutil_md5.h:54:20: note: previously declared as an array ‘ber_uint_t[4]’ {aka ‘unsigned int[4]’}
#   54 |         ber_uint_t buf[4],
#      |         ~~~~~~~~~~~^~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  209|    */
#  210|   void
#  211|-> lutil_MD5Transform( ber_uint_t *buf, const unsigned char *inraw )
#  212|   {
#  213|   	register ber_uint_t a, b, c, d;

Error: COMPILER_WARNING: [#def289]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/md5.c:211:59: warning[-Warray-parameter=]: argument 2 of type ‘const unsigned char *’ declared as a pointer
#  211 | lutil_MD5Transform( ber_uint_t *buf, const unsigned char *inraw )
#      |                                      ~~~~~~~~~~~~~~~~~~~~~^~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lutil_md5.h:55:29: note: previously declared as an array ‘const unsigned char[64]’
#   55 |         const unsigned char in[64]));
#      |         ~~~~~~~~~~~~~~~~~~~~^~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  209|    */
#  210|   void
#  211|-> lutil_MD5Transform( ber_uint_t *buf, const unsigned char *inraw )
#  212|   {
#  213|   	register ber_uint_t a, b, c, d;

Error: CLANG_WARNING: [#def290]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/meter.c:305:4: warning[deadcode.DeadStores]: Value stored to 'buf' is never read
#  303|   		if ( byte_rate >= 1024.0 ) {
#  304|   			snprintf( buf, buf_end-buf, " fast!" );
#  305|-> 			buf += 6;
#  306|   		} else {
#  307|   			snprintf( buf, buf_end-buf, " spd %5.1f %c/s",

Error: CLANG_WARNING: [#def291]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/meter.c:310:4: warning[deadcode.DeadStores]: Value stored to 'buf' is never read
#  308|   				  byte_rate,
#  309|   				  *prefix_chp);
#  310|-> 			buf += 5+6+4;
#  311|   		}
#  312|   	}

Error: CPPCHECK_WARNING: [#def292]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/passwd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def293]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/sasl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def294]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/sasl.c:196:22: warning[core.NullDereference]: Access to field 'resps' results in a dereference of a null pointer (loaded from variable 'defaults')
#  194|   		char *p = (char *)interact->result;
#  195|   		ldap_charray_add(&defaults->resps, interact->result);
#  196|-> 		interact->result = defaults->resps[defaults->nresps++];
#  197|   
#  198|   		/* zap */

Error: COMPILER_WARNING: [#def295]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/sha1.c:80:30: warning[-Warray-parameter=]: argument 1 of type ‘uint32 *’ {aka ‘unsigned int *’} declared as a pointer
#   80 | lutil_SHA1Transform( uint32 *state, const unsigned char *buffer )
#      |                      ~~~~~~~~^~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1189: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/sha1.c:39: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lutil_sha1.h:47:24: note: previously declared as an array ‘uint32[5]’ {aka ‘unsigned int[5]’}
#   47 |         LDAP_P((uint32 state[5], const unsigned char buffer[64]));
#      |                 ~~~~~~~^~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#   78|    */
#   79|   void
#   80|-> lutil_SHA1Transform( uint32 *state, const unsigned char *buffer )
#   81|   {
#   82|       uint32 a, b, c, d, e;

Error: COMPILER_WARNING: [#def296]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/sha1.c:80:58: warning[-Warray-parameter=]: argument 2 of type ‘const unsigned char *’ declared as a pointer
#   80 | lutil_SHA1Transform( uint32 *state, const unsigned char *buffer )
#      |                                     ~~~~~~~~~~~~~~~~~~~~~^~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lutil_sha1.h:47:54: note: previously declared as an array ‘const unsigned char[64]’
#   47 |         LDAP_P((uint32 state[5], const unsigned char buffer[64]));
#      |                                  ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#   78|    */
#   79|   void
#   80|-> lutil_SHA1Transform( uint32 *state, const unsigned char *buffer )
#   81|   {
#   82|       uint32 a, b, c, d, e;

Error: CLANG_WARNING: [#def297]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/sha1.c:128:5: warning[deadcode.DeadStores]: Value stored to 'a' is never read
#  126|   
#  127|       /* Wipe variables */
#  128|->     a = b = c = d = e = 0;
#  129|   }
#  130|   

Error: CLANG_WARNING: [#def298]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/sha1.c:128:9: warning[deadcode.DeadStores]: Although the value stored to 'b' is used in the enclosing expression, the value is never actually read from 'b'
#  126|   
#  127|       /* Wipe variables */
#  128|->     a = b = c = d = e = 0;
#  129|   }
#  130|   

Error: CLANG_WARNING: [#def299]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/sha1.c:128:13: warning[deadcode.DeadStores]: Although the value stored to 'c' is used in the enclosing expression, the value is never actually read from 'c'
#  126|   
#  127|       /* Wipe variables */
#  128|->     a = b = c = d = e = 0;
#  129|   }
#  130|   

Error: CLANG_WARNING: [#def300]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/sha1.c:128:17: warning[deadcode.DeadStores]: Although the value stored to 'd' is used in the enclosing expression, the value is never actually read from 'd'
#  126|   
#  127|       /* Wipe variables */
#  128|->     a = b = c = d = e = 0;
#  129|   }
#  130|   

Error: CLANG_WARNING: [#def301]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/sha1.c:128:21: warning[deadcode.DeadStores]: Although the value stored to 'e' is used in the enclosing expression, the value is never actually read from 'e'
#  126|   
#  127|       /* Wipe variables */
#  128|->     a = b = c = d = e = 0;
#  129|   }
#  130|   

Error: COMPILER_WARNING: [#def302]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/sha1.c:182:33: warning[-Warray-parameter=]: argument 1 of type ‘unsigned char *’ declared as a pointer
#  182 | lutil_SHA1Final( unsigned char *digest, lutil_SHA1_CTX *context )
#      |                  ~~~~~~~~~~~~~~~^~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lutil_sha1.h:59:31: note: previously declared as an array ‘unsigned char[20]’
#   59 |         LDAP_P((unsigned char digest[20], lutil_SHA1_CTX *context));
#      |                 ~~~~~~~~~~~~~~^~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  180|    */
#  181|   void
#  182|-> lutil_SHA1Final( unsigned char *digest, lutil_SHA1_CTX *context )
#  183|   {
#  184|       unsigned int i;

Error: CPPCHECK_WARNING: [#def303]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/utils.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def304]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/utils.c:778: warning[uninitvar]: Uninitialized variable: j
#  776|   			}
#  777|   		}
#  778|-> 		j++;
#  779|   		prev->beg += j;
#  780|   		prev->len -= j;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def305]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/utils.c: scope_hint: In function ‘scale’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/utils.c:778:18: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘j’
#  776|   			}
#  777|   		}
#  778|-> 		j++;
#  779|   		prev->beg += j;
#  780|   		prev->len -= j;

Error: CPPCHECK_WARNING: [#def306]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/uuid.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def307]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def308]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/liblutil/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: liblutil.a 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def309]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/config.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def310]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/config.c:376: error[uninitvar]: Uninitialized variables: tmp.lb_type, tmp.lb_private, tmp.lb_mapper, tmp.lb_mutex
#  374|   
#  375|   	return ( struct rewrite_builtin_map * )ldap_avl_find( info->li_maps,
#  376|-> 			( caddr_t )&tmp, rewrite_builtin_map_cmp );
#  377|   }
#  378|   

Error: CPPCHECK_WARNING (CWE-457): [#def311]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/context.c:89: error[uninitvar]: Uninitialized variables: c.lc_alias, c.lc_rule
#   87|   	c.lc_name = (char *)rewriteContext;
#   88|   	context = (struct rewrite_context *)ldap_avl_find( info->li_context, 
#   89|-> 			(caddr_t)&c, rewrite_context_cmp );
#   90|   	if ( context == NULL ) {
#   91|   		return NULL;

Error: CPPCHECK_WARNING: [#def312]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/escapemap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def313]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/ldapmap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def314]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/ldapmap.c:20: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/ldapmap.c: scope_hint: In function ‘map_ldap_parse’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/ldapmap.c:136:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/ldapmap.c:23: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/ldapmap.c:102:16: note: in expansion of macro ‘calloc’
#  134|   	/* trim everything after [host][:port] */
#  135|   	p = strchr( data->lm_url, '/' );
#  136|-> 	assert( p[ 1 ] == '/' );
#  137|   	if ( ( p = strchr( p + 2, '/' ) ) != NULL ) {
#  138|   		p[ 0 ] = '\0';

Error: CLANG_WARNING: [#def315]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/ldapmap.c:337:3: warning[deadcode.DeadStores]: Value stored to 'set_version' is never read
#  335|   		ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION,
#  336|   			(void *)&data->lm_version );
#  337|-> 		set_version = 0;
#  338|   	}
#  339|   

Error: CLANG_WARNING: [#def316]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/map.c:172:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  170|   
#  171|   	default:
#  172|-> 		end = strrchr( begin, ')' );
#  173|   		if ( end == NULL ) {
#  174|   			rc = -1;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def317]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/map.c: scope_hint: In function ‘rewrite_map_parse’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/map.c:172:23: warning[-Wanalyzer-null-argument]: use of NULL ‘begin’ where non-null expected
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/map.c:20: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/map.c:28: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/map.c:58:22: note: in expansion of macro ‘IS_REWRITE_SUBMATCH_ESCAPE’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/rewrite-int.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/string.h:86:31: note: in expansion of macro ‘SAFEMEMCPY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/map.c:94:9: note: in expansion of macro ‘AC_MEMCPY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/string.h:21: included_from: Included from here.
/usr/include/string.h:273:14: note: argument 1 of ‘strrchr’ must be non-null
#  170|   
#  171|   	default:
#  172|-> 		end = strrchr( begin, ')' );
#  173|   		if ( end == NULL ) {
#  174|   			rc = -1;

Error: CPPCHECK_WARNING: [#def318]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/parse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def319]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/parse.c:110:9: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
#  108|   			break;
#  109|   		case 1:
#  110|-> 			if ( strncasecmp( argv[ 0 ], "rewrite", 7 ) == 0 ) {
#  111|   				int rc;
#  112|   				rc = rewrite_parse( info, "file", lineno, 

Error: CLANG_WARNING: [#def320]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/rewrite.c:68:9: warning[deadcode.DeadStores]: Value stored to 'errmsg' during its initialization is never read
#   66|   			sep ? sep = strchr( rewriteContext, ',' ) : NULL )
#   67|   	{
#   68|-> 		char	*errmsg = "";
#   69|   
#   70|   		if ( sep != NULL ) {

Error: CPPCHECK_WARNING: [#def321]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/rule.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def322]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/session.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def323]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/session.c:92: error[uninitvar]: Uninitialized variables: tmp.ls_vars, tmp.ls_vars_mutex, tmp.ls_mutex, tmp.ls_count
#   90|   	tmp.ls_cookie = ( void * )cookie;
#   91|   	session = ( struct rewrite_session * )ldap_avl_find( info->li_cookies, 
#   92|-> 			( caddr_t )&tmp, rewrite_cookie_cmp );
#   93|   	if ( session ) {
#   94|   		session->ls_count++;

Error: CPPCHECK_WARNING (CWE-457): [#def324]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/session.c:165: error[uninitvar]: Uninitialized variables: tmp.ls_vars, tmp.ls_vars_mutex, tmp.ls_mutex, tmp.ls_count
#  163|   #endif /* USE_REWRITE_LDAP_PVT_THREADS */
#  164|   	session = ( struct rewrite_session * )ldap_avl_find( info->li_cookies,
#  165|-> 			( caddr_t )&tmp, rewrite_cookie_cmp );
#  166|   #ifdef USE_REWRITE_LDAP_PVT_THREADS
#  167|   	if ( session ) {

Error: CPPCHECK_WARNING: [#def325]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/subst.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def326]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/subst.c: scope_hint: In function ‘rewrite_subst_apply’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/subst.c:318:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘submatch’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/subst.c:20: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/subst.c:22: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/subst.c:305:28: note: in expansion of macro ‘calloc’
#  316|   		struct berval	key = { 0, NULL };
#  317|   
#  318|-> 		submatch[ n ].bv_val = NULL;
#  319|   		
#  320|   		/*

Error: CPPCHECK_WARNING (CWE-457): [#def327]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/var.c:116: error[uninitvar]: Uninitialized variables: var.lv_flags, var.lv_value
#  114|   	var.lv_name = ( char * )name;
#  115|   	return ( struct rewrite_var * )ldap_avl_find( tree, 
#  116|-> 			( caddr_t )&var, rewrite_var_cmp );
#  117|   }
#  118|   

Error: COMPILER_WARNING: [#def328]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def329]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: librewrite.a 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def330]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/libraries/librewrite/xmap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def331]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/backend.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def332]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/bind.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def333]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/client.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def334]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/config.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def335]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/config.c:184:45: warning[-Wmissing-braces]: missing braces around initializer
#  184 | static ConfigTable config_back_cf_table[] = {
#      |                                             ^
#  182|   /* alphabetical ordering */
#  183|   
#  184|-> static ConfigTable config_back_cf_table[] = {
#  185|       /* This attr is read-only */
#  186|       { "", "", 0, 0, 0,

Error: COMPILER_WARNING (CWE-681): [#def336]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/config.c: scope_hint: In function ‘lload_config_find_keyword’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/config.c:2280:48: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘lutil_b64_pton’ differ in signedness
# 2280 |         c->linelen = lutil_b64_pton( c->line, c->tline, decode_len );
#      |                                               ~^~~~~~~
#      |                                                |
#      |                                                char *
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1189: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/config.c:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lutil.h:55:9: note: expected ‘unsigned char *’ but argument is of type ‘char *’
#   55 |         unsigned char *,
#      |         ^~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
# 2278|           ch_free( c->tline );
# 2279|           c->tline = ch_malloc( decode_len + 1 );
# 2280|->         c->linelen = lutil_b64_pton( c->line, c->tline, decode_len );
# 2281|           if ( c->linelen < 0 ) {
# 2282|               ch_free( c->tline );

Error: CLANG_WARNING: [#def337]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/config.c:2318:15: warning[deadcode.DeadStores]: Value stored to 'ignored' during its initialization is never read
# 2316|       }
# 2317|       if ( Conf->max_args && ( c->argc > Conf->max_args ) ) {
# 2318|->         char *ignored = " ignored";
# 2319|   
# 2320|           snprintf( c->cr_msg, sizeof(c->cr_msg), "<%s> extra cruft after <%s>",

Error: CLANG_WARNING: [#def338]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/config.c:3423:13: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'next')
# 3421|           next = line;
# 3422|       }
# 3423|->     while ( *next && strchr( sep, *next ) ) {
# 3424|           next++;
# 3425|       }

Error: CPPCHECK_WARNING: [#def339]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/connection.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def340]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/daemon.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-476): [#def341]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/daemon.c:257: warning[nullPointer]: Possible null pointer dereference: host
#  255|           sap[1] = NULL;
#  256|   
#  257|->         if ( strlen( host ) >
#  258|                   ( sizeof( ((struct sockaddr_un *)*sap)->sun_path ) - 1 ) ) {
#  259|               Debug( LDAP_DEBUG_ANY, "lload_get_listener_addresses: "

Error: GCC_ANALYZER_WARNING (CWE-688): [#def342]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/daemon.c: scope_hint: In function ‘lload_get_listener_addresses’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/daemon.c:257:14: warning[-Wanalyzer-null-argument]: use of NULL ‘host’ where non-null expected
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/daemon.c:27: included_from: Included from here.
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
#  255|           sap[1] = NULL;
#  256|   
#  257|->         if ( strlen( host ) >
#  258|                   ( sizeof( ((struct sockaddr_un *)*sap)->sun_path ) - 1 ) ) {
#  259|               Debug( LDAP_DEBUG_ANY, "lload_get_listener_addresses: "

Error: CLANG_WARNING: [#def343]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/daemon.c:257:14: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  255|           sap[1] = NULL;
#  256|   
#  257|->         if ( strlen( host ) >
#  258|                   ( sizeof( ((struct sockaddr_un *)*sap)->sun_path ) - 1 ) ) {
#  259|               Debug( LDAP_DEBUG_ANY, "lload_get_listener_addresses: "

Error: CLANG_WARNING: [#def344]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/daemon.c:468:20: warning[core.NullDereference]: Array access (from variable 'sal') results in a null pointer dereference
#  466|        * for it in the lload_listeners array.
#  467|        */
#  468|->     for ( num = 0; sal[num]; num++ ) /* empty */;
#  469|       if ( num > 1 ) {
#  470|           *listeners += num - 1;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def345]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/daemon.c: scope_hint: In function ‘lload_resume_listeners’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/daemon.c:1976:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**lload_listeners.sl_sd’
# 1974|           lload_listeners[i]->sl_mute = 0;
# 1975|           listen( lload_listeners[i]->sl_sd, SLAPD_LISTEN_BACKLOG );
# 1976|->         evconnlistener_enable( lload_listeners[i]->listener );
# 1977|       }
# 1978|   }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def346]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/daemon.c:1976:47: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**lload_listeners.sl_sd’
# 1974|           lload_listeners[i]->sl_mute = 0;
# 1975|           listen( lload_listeners[i]->sl_sd, SLAPD_LISTEN_BACKLOG );
# 1976|->         evconnlistener_enable( lload_listeners[i]->listener );
# 1977|       }
# 1978|   }

Error: CPPCHECK_WARNING: [#def347]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/epoch.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def348]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/extended.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def349]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/monitor.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def350]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/monitor.c: scope_hint: In function ‘lload_monitor_conn_update’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/monitor.c:615:19: warning[-Wunused-variable]: unused variable ‘active’
#  615 |     ldap_pvt_mp_t active, pending, received, completed, failed;
#      |                   ^~~~~~
#  613|       LloadConnection *c = priv;
#  614|       struct berval bv_type, bv_state;
#  615|->     ldap_pvt_mp_t active, pending, received, completed, failed;
#  616|   
#  617|       CONNECTION_LOCK(c);

Error: COMPILER_WARNING (CWE-563): [#def351]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/monitor.c:750:22: warning[-Wunused-variable]: unused variable ‘mp’
#  750 |     monitor_entry_t *mp;
#      |                      ^~
#  748|       struct berval bv_rdn, bv_timestamp, zero = BER_BVC("0"),
#  749|                                           value = BER_BVC("unknown");
#  750|->     monitor_entry_t *mp;
#  751|       monitor_callback_t *cb;
#  752|       Entry *e;

Error: COMPILER_WARNING (CWE-563): [#def352]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/monitor.c: scope_hint: In function ‘lload_monitor_conn_entry_create’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/monitor.c:753:16: warning[-Wunused-variable]: unused variable ‘a’
#  753 |     Attribute *a;
#      |                ^
#  751|       monitor_callback_t *cb;
#  752|       Entry *e;
#  753|->     Attribute *a;
#  754|       BackendInfo *mi = backend_info( "monitor" );
#  755|       monitor_extra_t *mbe = mi->bi_extra;

Error: COMPILER_WARNING (CWE-563): [#def353]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/operation.c: scope_hint: In function ‘operation_unlink’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/operation.c:234:15: warning[-Wunused-variable]: unused variable ‘prev_refcnt’
#  234 |     uintptr_t prev_refcnt;
#      |               ^~~~~~~~~~~
#  232|   {
#  233|       LloadConnection *client, *upstream;
#  234|->     uintptr_t prev_refcnt;
#  235|       int result = 0;
#  236|   

Error: CPPCHECK_WARNING: [#def354]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/tier_bestof.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-1164): [#def355]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/tier_bestof.c:145:1: warning[-Wunused-function]: ‘bestof_backend_options’ defined but not used
#  145 | bestof_backend_options( LloadTier *tier, LloadBackend *b, char *arg )
#      | ^~~~~~~~~~~~~~~~~~~~~~
#  143|   
#  144|   static int
#  145|-> bestof_backend_options( LloadTier *tier, LloadBackend *b, char *arg )
#  146|   {
#  147|       struct berval weight = BER_BVC("weight=");

Error: CPPCHECK_WARNING: [#def356]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/tier_roundrobin.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def357]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/tier_weighted.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def358]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/upstream.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def359]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def360]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/lloadd/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: lloadd 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def361]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/acl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def362]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/acl.c:456:9: warning[core.CallAndMessage]: Called function pointer is null (null dereference)
#  454|   		/* use default (but pass through frontend
#  455|   		 * for global ACL overlays) */
#  456|-> 		ret = frontendDB->bd_info->bi_access_allowed( op, e,
#  457|   				desc, val, access, state, &mask );
#  458|   	}

Error: CLANG_WARNING: [#def363]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/acl.c:648:10: warning[core.NullDereference]: Dereference of null pointer
#  646|   					a->acl_attrval.bv_val );
#  647|   	
#  648|-> 				if ( a->acl_attrs[0].an_desc->ad_type->sat_syntax != slap_schema.si_syn_distinguishedName ) {
#  649|   					if (value_match( &match, desc,
#  650|   						a->acl_attrval_mr, 0,

Error: COMPILER_WARNING (CWE-563): [#def364]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/acl.c: scope_hint: In function ‘slap_acl_mask’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/acl.c:1157:29: warning[-Wunused-but-set-variable]: variable ‘oldmask’ set but not used
# 1157 |                 slap_mask_t oldmask, modmask;
#      |                             ^~~~~~~
# 1155|   
# 1156|   	for ( ; b != NULL; b = b->a_next, i++ ) {
# 1157|-> 		slap_mask_t oldmask, modmask;
# 1158|   
# 1159|   		ACL_INVALIDATE( modmask );

Error: CLANG_WARNING: [#def365]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/acl.c:1849:3: warning[deadcode.DeadStores]: Value stored to 'oldmask' is never read
# 1847|   					: "stop" );
# 1848|   		/* save old mask */
# 1849|-> 		oldmask = *mask;
# 1850|   
# 1851|   		if( ACL_IS_ADDITIVE(modmask) ) {

Error: CLANG_WARNING: [#def366]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/acl.c:2188:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 2186|   			cp->asc_op->o_log_prefix, name->bv_val );
# 2187|   
# 2188|-> 		rc = LDAP_PROTOCOL_ERROR;
# 2189|   		goto url_done;
# 2190|   	}

Error: CLANG_WARNING: [#def367]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/acl.c:2200:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 2198|   			cp->asc_op->o_log_prefix, name->bv_val );
# 2199|   
# 2200|-> 		rc = LDAP_PROTOCOL_ERROR;
# 2201|   		goto url_done;
# 2202|   	}

Error: CLANG_WARNING: [#def368]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/acl.c:2223:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 2221|   			cp->asc_op->o_log_prefix, op2.o_req_ndn.bv_val );
# 2222|   
# 2223|-> 		rc = LDAP_NO_SUCH_OBJECT;
# 2224|   		goto url_done;
# 2225|   	}

Error: CLANG_WARNING: [#def369]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/acl.c:2237:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 2235|   				cp->asc_op->o_log_prefix, op2.ors_filterstr.bv_val );
# 2236|   
# 2237|-> 			rc = LDAP_PROTOCOL_ERROR;
# 2238|   			goto url_done;
# 2239|   		}

Error: CPPCHECK_WARNING: [#def370]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def371]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:137:2: warning[deadcode.DeadStores]: Value stored to 'size' is never read
#  135|   	sp = pat;
#  136|   	dp = buf;
#  137|-> 	size = 0;
#  138|   	buf[0] = '\0';
#  139|   

Error: COMPILER_WARNING: [#def372]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c: scope_hint: In function ‘regtest’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:173:77: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
#  173 |                                   "regular expression \"%s\" bad because of %s", pat, error);
#      |                                                                             ^~        ~~~~~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  171|   
#  172|   		snprintf( c->cr_msg, sizeof ( c->cr_msg ),
#  173|-> 				  "regular expression \"%s\" bad because of %s", pat, error);
#  174|   		Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg );
#  175|   		acl_usage();

Error: CLANG_WARNING: [#def373]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:337:6: warning[deadcode.DeadStores]: Value stored to 'lineno' during its initialization is never read
#  335|   	Backend *be = c->be;
#  336|   	const char *fname = c->fname;
#  337|-> 	int lineno = c->lineno;
#  338|   	int argc = c->argc;
#  339|   	char **argv = c->argv;

Error: COMPILER_WARNING (CWE-563): [#def374]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c: scope_hint: In function ‘parse_acl’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:337:13: warning[-Wunused-variable]: unused variable ‘lineno’
#  337 |         int lineno = c->lineno;
#      |             ^~~~~~
#  335|   	Backend *be = c->be;
#  336|   	const char *fname = c->fname;
#  337|-> 	int lineno = c->lineno;
#  338|   	int argc = c->argc;
#  339|   	char **argv = c->argv;

Error: COMPILER_WARNING: [#def375]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c: scope_hint: In function ‘parse_acl’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:534:113: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
#  534 |                                                                       "regular expression \"%s\" bad because of %s",
#      |                                                                                                                 ^~
#  535 |                                                                       right, err );
#      |                                                                              ~~~                                 
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  532|   								regerror( e, &a->acl_attrval_re, err, sizeof( err ) );
#  533|   								snprintf( c->cr_msg, sizeof( c->cr_msg ),
#  534|-> 								      "regular expression \"%s\" bad because of %s",
#  535|   								      right, err );
#  536|   								Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg );

Error: CLANG_WARNING: [#def376]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:674:7: warning[core.CallAndMessage]: 4th function call argument is an uninitialized value
#  672|   
#  673|   						regerror( e, &a->acl_dn_re, err, sizeof( err ) );
#  674|-> 						snprintf( c->cr_msg, sizeof( c->cr_msg ),
#  675|   						      "regular expression \"%s\" bad because of %s",
#  676|   						      right, err );

Error: COMPILER_WARNING: [#def377]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c: scope_hint: In function ‘parse_acl’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:675:97: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
#  675 |                                                       "regular expression \"%s\" bad because of %s",
#      |                                                                                                 ^~
#  676 |                                                       right, err );
#      |                                                              ~~~                                 
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  673|   						regerror( e, &a->acl_dn_re, err, sizeof( err ) );
#  674|   						snprintf( c->cr_msg, sizeof( c->cr_msg ),
#  675|-> 						      "regular expression \"%s\" bad because of %s",
#  676|   						      right, err );
#  677|   						Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg );

Error: CLANG_WARNING: [#def378]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:2489:9: warning[core.NullDereference]: Dereference of null pointer
# 2487|   dnaccess2text( slap_dn_access *bdn, char *ptr, int is_realdn )
# 2488|   {
# 2489|-> 	*ptr++ = ' ';
# 2490|   
# 2491|   	if ( is_realdn ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def379]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c: scope_hint: In function ‘dnaccess2text’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:2489:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ptr’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:2762:23: note: in expansion of macro ‘acl_safe_strcopy’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:2762:23: note: in expansion of macro ‘acl_safe_strcopy’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:2541:15: note: in expansion of macro ‘acl_safe_strcopy’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:2541:15: note: in expansion of macro ‘acl_safe_strcopy’
# 2487|   dnaccess2text( slap_dn_access *bdn, char *ptr, int is_realdn )
# 2488|   {
# 2489|-> 	*ptr++ = ' ';
# 2490|   
# 2491|   	if ( is_realdn ) {

Error: CLANG_WARNING: [#def380]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:2669:7: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
# 2667|   	}
# 2668|   	ptr = acl_safe_strcopy( ptr, accessmask2str( b->a_access_mask, maskbuf, 0 ));
# 2669|-> 	if ( !maskbuf[0] ) ptr--;
# 2670|   
# 2671|   	if( b->a_type == ACL_BREAK ) {

Error: CLANG_WARNING: [#def381]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:2751:4: warning[core.NullDereference]: Dereference of null pointer
# 2749|   		ptr = acl_safe_strcopy( ptr, " val." );
# 2750|   		if ( a->acl_attrval_style == ACL_STYLE_BASE &&
# 2751|-> 			a->acl_attrs[0].an_desc->ad_type->sat_syntax ==
# 2752|   				slap_schema.si_syn_distinguishedName )
# 2753|   			ptr = acl_safe_strcopy( ptr, style_base );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def382]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c: scope_hint: In function ‘acl_unparse’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/aclparse.c:2768:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ptr’
# 2766|   		ptr = access2text( b, ptr );
# 2767|   	}
# 2768|-> 	*ptr = '\0';
# 2769|   	bv->bv_val = aclbuf.bv_val;
# 2770|   	bv->bv_len = ptr - bv->bv_val;

Error: CPPCHECK_WARNING: [#def383]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/ad.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def384]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/add.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def385]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/add.c:237:18: warning[deadcode.DeadStores]: Value stored to 'modtail' during its initialization is never read
#  235|   fe_op_add( Operation *op, SlapReply *rs )
#  236|   {
#  237|-> 	Modifications	**modtail = &op->ora_modlist;
#  238|   	int		rc = 0;
#  239|   	BackendDB	*op_be, *bd = op->o_bd;

Error: CPPCHECK_WARNING: [#def386]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/at.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def387]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/attr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def388]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/ava.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def389]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/ava.c:131:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  129|   		ber_dupbv_x( &aa->aa_value, &value, op->o_tmpmemctx );
#  130|   		*text = NULL;
#  131|-> 		rc = LDAP_SUCCESS;
#  132|   	}
#  133|   

Error: CPPCHECK_WARNING: [#def390]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/add.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def391]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/add.c: scope_hint: In function ‘asyncmeta_back_add’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/add.c:245:15: warning[-Wunused-variable]: unused variable ‘thrctx’
#  245 |         void *thrctx = op->o_threadctx;
#      |               ^~~~~~
#  243|   	a_metaconn_t	*mc;
#  244|   	int		rc, candidate = -1;
#  245|-> 	void *thrctx = op->o_threadctx;
#  246|   	bm_context_t *bc;
#  247|   	SlapReply *candidates;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def392]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:36: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/back-asyncmeta.h:218:57: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/back-asyncmeta.h:220:49: note: in expansion of macro ‘META_BACK_CMN_ISSET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1136:40: note: in expansion of macro ‘META_BACK_CMN_CHASE_REFERRALS’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/back-asyncmeta.h:220:49: note: in expansion of macro ‘META_BACK_CMN_ISSET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1136:40: note: in expansion of macro ‘META_BACK_CMN_CHASE_REFERRALS’
#  216|   
#  217|   	unsigned		mc_flags;
#  218|-> #define	META_BACK_CMN_ISSET(mc,f)		( ( (mc)->mc_flags & (f) ) == (f) )
#  219|   #define	META_BACK_CMN_QUARANTINE(mc)		META_BACK_CMN_ISSET( (mc), LDAP_BACK_F_QUARANTINE )
#  220|   #define	META_BACK_CMN_CHASE_REFERRALS(mc)	META_BACK_CMN_ISSET( (mc), LDAP_BACK_F_CHASE_REFERRALS )

Error: CPPCHECK_WARNING: [#def393]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/bind.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def394]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/candidates.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def395]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/candidates.c:59:19: warning[deadcode.DeadStores]: Value stored to 'ms' during its initialization is never read
#   57|   asyncmeta_subtree_match( a_metatarget_t *mt, struct berval *ndn, int scope )
#   58|   {
#   59|-> 	a_metasubtree_t *ms = mt->mt_subtree;
#   60|   
#   61|   	for ( ms = mt->mt_subtree; ms; ms = ms->ms_next ) {

Error: CLANG_WARNING: [#def396]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/compare.c:187:8: warning[deadcode.DeadStores]: Value stored to 'thrctx' during its initialization is never read
#  185|   	a_metaconn_t	*mc;
#  186|   	int		rc, candidate = -1;
#  187|-> 	void *thrctx = op->o_threadctx;
#  188|   	bm_context_t *bc;
#  189|   	SlapReply *candidates;

Error: COMPILER_WARNING (CWE-563): [#def397]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/compare.c: scope_hint: In function ‘asyncmeta_back_compare’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/compare.c:187:15: warning[-Wunused-variable]: unused variable ‘thrctx’
#  187 |         void *thrctx = op->o_threadctx;
#      |               ^~~~~~
#  185|   	a_metaconn_t	*mc;
#  186|   	int		rc, candidate = -1;
#  187|-> 	void *thrctx = op->o_threadctx;
#  188|   	bm_context_t *bc;
#  189|   	SlapReply *candidates;

Error: CPPCHECK_WARNING: [#def398]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def399]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:100:34: warning[-Wmissing-braces]: missing braces around initializer
#  100 | static ConfigTable a_metacfg[] = {
#      |                                  ^
#   98|   };
#   99|   
#  100|-> static ConfigTable a_metacfg[] = {
#  101|   	{ "uri", "uri", 2, 0, 0,
#  102|   		ARG_MAGIC|LDAP_BACK_CFG_URI,

Error: CLANG_WARNING: [#def400]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:601:18: warning[core.NullDereference]: Access to field 'mt_lsuffixm' results in a dereference of a null pointer (loaded from variable 'mt')
#  599|   	}
#  600|   
#  601|-> 	mt->mt_lsuffixm = pvnc;
#  602|   	mt->mt_rsuffixm = prnc;
#  603|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def401]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c: scope_hint: In function ‘asyncmeta_suffixm_config’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:601:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:23: included_from: Included from here.
#  599|   	}
#  600|   
#  601|-> 	mt->mt_lsuffixm = pvnc;
#  602|   	mt->mt_rsuffixm = prnc;
#  603|   

Error: CLANG_WARNING: [#def402]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:672:8: warning[core.NullDereference]: Access to field 'mt_subtree' results in a dereference of a null pointer (loaded from variable 'mt')
#  670|   	struct berval bv, *style;
#  671|   
#  672|-> 	if ( !mt->mt_subtree )
#  673|   		return 1;
#  674|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def403]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c: scope_hint: In function ‘asyncmeta_subtree_unparse’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:672:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
#  670|   	struct berval bv, *style;
#  671|   
#  672|-> 	if ( !mt->mt_subtree )
#  673|   		return 1;
#  674|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def404]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c: scope_hint: In function ‘asyncmeta_subtree_config’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:709:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
#  707|   
#  708|   	if ( c->type == LDAP_BACK_CFG_SUBTREE_EX ) {
#  709|-> 		if ( mt->mt_subtree && !mt->mt_subtree_exclude ) {
#  710|   			snprintf( c->cr_msg, sizeof(c->cr_msg),
#  711|   				"\"subtree-exclude\" incompatible with previous \"subtree-include\" directives" );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def405]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:718:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
#  716|   
#  717|   	} else {
#  718|-> 		if ( mt->mt_subtree && mt->mt_subtree_exclude ) {
#  719|   			snprintf( c->cr_msg, sizeof(c->cr_msg),
#  720|   				"\"subtree-include\" incompatible with previous \"subtree-exclude\" directives" );

Error: COMPILER_WARNING: [#def406]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c: scope_hint: In function ‘asyncmeta_subtree_config’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:809:75: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
#  809 |                                 "regular expression \"%s\" bad because of %s",
#      |                                                                           ^~
#  810 |                                 pattern, regerr );
#      |                                          ~~~~~~                            
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  807|   
#  808|   			snprintf( c->cr_msg, sizeof( c->cr_msg ),
#  809|-> 				"regular expression \"%s\" bad because of %s",
#  810|   				pattern, regerr );
#  811|   			ch_free( ms );

Error: CLANG_WARNING: [#def407]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1124:32: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 1122|   				mask &= ~LDAP_BACK_F_CANCEL_EXOP;
# 1123|   			}
# 1124|-> 			enum_to_verb( cancel_mode, (mc->mc_flags & mask), &bv );
# 1125|   			if ( BER_BVISNULL( &bv ) ) {
# 1126|   				/* there's something wrong... */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def408]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c: scope_hint: In function ‘asyncmeta_back_cf_gen’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1124:55: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1122|   				mask &= ~LDAP_BACK_F_CANCEL_EXOP;
# 1123|   			}
# 1124|-> 			enum_to_verb( cancel_mode, (mc->mc_flags & mask), &bv );
# 1125|   			if ( BER_BVISNULL( &bv ) ) {
# 1126|   				/* there's something wrong... */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def409]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1162:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1160|   
# 1161|   		case LDAP_BACK_CFG_NETWORK_TIMEOUT:
# 1162|-> 			if ( mc->mc_network_timeout == 0 ) {
# 1163|   				return 1;
# 1164|   			}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def410]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1180:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1178|   
# 1179|   		case LDAP_BACK_CFG_NRETRIES:
# 1180|-> 			if ( mc->mc_nretries == META_RETRY_FOREVER ) {
# 1181|   				BER_BVSTR( &bv, "forever" );
# 1182|   			} else if ( mc->mc_nretries == META_RETRY_NEVER ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def411]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1238:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1236|   
# 1237|   		case LDAP_BACK_CFG_VERSION:
# 1238|-> 			if ( mc->mc_version == 0 )
# 1239|   				return 1;
# 1240|   			c->value_int = mc->mc_version;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def412]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1250:52: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1248|   
# 1249|   		case LDAP_BACK_CFG_T_F:
# 1250|-> 			enum_to_verb( t_f_mode, (mc->mc_flags & LDAP_BACK_F_T_F_MASK2), &bv );
# 1251|   			if ( BER_BVISNULL( &bv ) ) {
# 1252|   				/* there's something wrong... */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def413]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1264:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1262|   			struct berval bc = BER_BVNULL, bv2;
# 1263|   
# 1264|-> 			if (( mc->mc_flags & LDAP_BACK_F_TLS_MASK ) == LDAP_BACK_F_NONE ) {
# 1265|   				rc = 1;
# 1266|   				break;

Error: CLANG_WARNING: [#def414]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1290:28: warning[core.NullDereference]: Access to field 'mt_uri' results in a dereference of a null pointer (loaded from variable 'mt')
# 1288|   		/* target attrs */
# 1289|   		case LDAP_BACK_CFG_URI: {
# 1290|-> 			char *p2, *p1 = strchr( mt->mt_uri, ' ' );
# 1291|   			bv.bv_len = strlen( mt->mt_uri ) + 3 + mt->mt_psuffix.bv_len;
# 1292|   			bv.bv_val = ch_malloc( bv.bv_len + 1 );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def415]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1290:51: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1288|   		/* target attrs */
# 1289|   		case LDAP_BACK_CFG_URI: {
# 1290|-> 			char *p2, *p1 = strchr( mt->mt_uri, ' ' );
# 1291|   			bv.bv_len = strlen( mt->mt_uri ) + 3 + mt->mt_psuffix.bv_len;
# 1292|   			bv.bv_val = ch_malloc( bv.bv_len + 1 );

Error: CLANG_WARNING: [#def416]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1316:9: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'bvp')
# 1314|   
# 1315|   			bvp = &mt->mt_idassert_authz;
# 1316|-> 			if ( *bvp == NULL ) {
# 1317|   				if ( mt->mt_idassert_flags & LDAP_BACK_AUTH_AUTHZ_ALL )
# 1318|   				{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def417]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1316:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1314|   
# 1315|   			bvp = &mt->mt_idassert_authz;
# 1316|-> 			if ( *bvp == NULL ) {
# 1317|   				if ( mt->mt_idassert_flags & LDAP_BACK_AUTH_AUTHZ_ALL )
# 1318|   				{

Error: CLANG_WARNING: [#def418]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1335:5: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read
# 1333|   				ptr = bv.bv_val;
# 1334|   				ptr = lutil_strcopy( ptr, buf );
# 1335|-> 				ptr = lutil_strncopy( ptr, ((*bvp)[ i ]).bv_val, ((*bvp)[ i ]).bv_len );
# 1336|   				value_add_one( &c->rvalue_vals, &bv );
# 1337|   			}

Error: CLANG_WARNING: [#def419]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1349:9: warning[core.NullDereference]: Dereference of null pointer
# 1347|   			char		*ptr;
# 1348|   
# 1349|-> 			if ( mt->mt_idassert_authmethod == LDAP_AUTH_NONE ) {
# 1350|   				return 1;
# 1351|   			} else {

Error: CLANG_WARNING: [#def420]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1373:7: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read
# 1371|   
# 1372|   						ptr = lutil_strcopy( bv.bv_val, "mode=" );
# 1373|-> 						ptr = lutil_strcopy( ptr, mode.bv_val );
# 1374|   					}
# 1375|   					break;

Error: CLANG_WARNING: [#def421]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1490:9: warning[core.NullDereference]: Dereference of null pointer
# 1488|   
# 1489|   		case LDAP_BACK_CFG_SUFFIXM:
# 1490|-> 			if ( mt->mt_lsuffixm.bv_val ) {
# 1491|   				struct berval bv;
# 1492|   				char *ptr;

Error: CLANG_WARNING: [#def422]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1514:9: warning[core.NullDereference]: Access to field 'mt_filter' results in a dereference of a null pointer (loaded from variable 'mt')
# 1512|   
# 1513|   		case LDAP_BACK_CFG_FILTER:
# 1514|-> 			if ( mt->mt_filter == NULL ) {
# 1515|   				rc = 1;
# 1516|   			} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def423]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1514:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1512|   
# 1513|   		case LDAP_BACK_CFG_FILTER:
# 1514|-> 			if ( mt->mt_filter == NULL ) {
# 1515|   				rc = 1;
# 1516|   			} else {

Error: CLANG_WARNING: [#def424]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1544:20: warning[core.NullDereference]: Dereference of null pointer
# 1542|   
# 1543|   		case LDAP_BACK_CFG_TCP_USER_TIMEOUT:
# 1544|-> 			c->value_uint = mt->mt_tls.sb_tcp_user_timeout;
# 1545|   			break;
# 1546|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def425]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1589:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1587|   
# 1588|   		case LDAP_BACK_CFG_CANCEL:
# 1589|-> 			mc->mc_flags &= ~LDAP_BACK_F_CANCEL_MASK2;
# 1590|   			break;
# 1591|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def426]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1593:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1591|   
# 1592|   		case LDAP_BACK_CFG_CHASE:
# 1593|-> 			mc->mc_flags &= ~LDAP_BACK_F_CHASE_REFERRALS;
# 1594|   			break;
# 1595|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def427]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1613:56: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1611|   				rc = 1;
# 1612|   			} else {
# 1613|-> 				mc->mc_network_timeout = 0;
# 1614|   			}
# 1615|   			break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def428]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1618:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1616|   
# 1617|   		case LDAP_BACK_CFG_NOREFS:
# 1618|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOREFS;
# 1619|   			break;
# 1620|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def429]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1622:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1620|   
# 1621|   		case LDAP_BACK_CFG_NOUNDEFFILTER:
# 1622|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOUNDEFFILTER;
# 1623|   			break;
# 1624|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def430]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1626:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1624|   
# 1625|   		case LDAP_BACK_CFG_NRETRIES:
# 1626|-> 			mc->mc_nretries = META_RETRY_DEFAULT;
# 1627|   			break;
# 1628|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def431]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1641:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1639|   
# 1640|   		case LDAP_BACK_CFG_REBIND:
# 1641|-> 			mc->mc_flags &= ~LDAP_BACK_F_SAVECRED;
# 1642|   			break;
# 1643|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def432]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1657:48: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1655|   				rc = 1;
# 1656|   			} else {
# 1657|-> 				mc->mc_version = 0;
# 1658|   			}
# 1659|   			break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def433]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1663:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1661|   #ifdef SLAP_CONTROL_X_SESSION_TRACKING
# 1662|   		case LDAP_BACK_CFG_ST_REQUEST:
# 1663|-> 			mc->mc_flags &= ~LDAP_BACK_F_ST_REQUEST;
# 1664|   			break;
# 1665|   #endif /* SLAP_CONTROL_X_SESSION_TRACKING */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def434]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1668:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1666|   
# 1667|   		case LDAP_BACK_CFG_T_F:
# 1668|-> 			mc->mc_flags &= ~LDAP_BACK_F_T_F_MASK2;
# 1669|   			break;
# 1670|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def435]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1672:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 1670|   
# 1671|   		case LDAP_BACK_CFG_TLS:
# 1672|-> 			mc->mc_flags &= ~LDAP_BACK_F_TLS_MASK;
# 1673|   			if ( mt )
# 1674|   				bindconf_free( &mt->mt_tls );

Error: CLANG_WARNING: [#def436]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1685:10: warning[core.NullDereference]: Access to field 'mt_uri' results in a dereference of a null pointer (loaded from variable 'mt')
# 1683|   				rc = 1;
# 1684|   			} else {
# 1685|-> 				if ( mt->mt_uri ) {
# 1686|   					ch_free( mt->mt_uri );
# 1687|   					mt->mt_uri = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def437]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1685:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1683|   				rc = 1;
# 1684|   			} else {
# 1685|-> 				if ( mt->mt_uri ) {
# 1686|   					ch_free( mt->mt_uri );
# 1687|   					mt->mt_uri = NULL;

Error: CLANG_WARNING: [#def438]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1706:11: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'bvp')
# 1704|   			} else {
# 1705|   				if ( c->valx < 0 ) {
# 1706|-> 					if ( *bvp != NULL ) {
# 1707|   						ber_bvarray_free( *bvp );
# 1708|   						*bvp = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def439]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1706:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1704|   			} else {
# 1705|   				if ( c->valx < 0 ) {
# 1706|-> 					if ( *bvp != NULL ) {
# 1707|   						ber_bvarray_free( *bvp );
# 1708|   						*bvp = NULL;

Error: CLANG_WARNING: [#def440]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1712:11: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'bvp')
# 1710|   
# 1711|   				} else {
# 1712|-> 					if ( *bvp == NULL ) {
# 1713|   						rc = 1;
# 1714|   						break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def441]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1712:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1710|   
# 1711|   				} else {
# 1712|-> 					if ( *bvp == NULL ) {
# 1713|   						rc = 1;
# 1714|   						break;

Error: CLANG_WARNING: [#def442]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1742:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 1740|   			} else {
# 1741|   				bindconf_free( &mt->mt_idassert.si_bc );
# 1742|-> 				memset( &mt->mt_idassert, 0, sizeof( slap_idassert_t ) );
# 1743|   			}
# 1744|   			break;

Error: CLANG_WARNING: [#def443]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1753:10: warning[core.NullDereference]: Dereference of null pointer
# 1751|   				rc = 1;
# 1752|   			} else {
# 1753|-> 				if ( mt->mt_lsuffixm.bv_val ) {
# 1754|   					ch_free( mt->mt_lsuffixm.bv_val );
# 1755|   					ch_free( mt->mt_rsuffixm.bv_val );

Error: CLANG_WARNING: [#def444]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1765:50: warning[core.NullDereference]: Access to field 'mt_subtree_exclude' results in a dereference of a null pointer (loaded from variable 'mt')
# 1763|   		case LDAP_BACK_CFG_SUBTREE_IN:
# 1764|   			/* can only be one of exclude or include */
# 1765|-> 			if (( c->type == LDAP_BACK_CFG_SUBTREE_EX ) ^ mt->mt_subtree_exclude ) {
# 1766|   				rc = 1;
# 1767|   				break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def445]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1765:73: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1763|   		case LDAP_BACK_CFG_SUBTREE_IN:
# 1764|   			/* can only be one of exclude or include */
# 1765|-> 			if (( c->type == LDAP_BACK_CFG_SUBTREE_EX ) ^ mt->mt_subtree_exclude ) {
# 1766|   				rc = 1;
# 1767|   				break;

Error: CLANG_WARNING: [#def446]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1790:31: warning[core.NullDereference]: Access to field 'mt_filter' results in a dereference of a null pointer (loaded from variable 'mt')
# 1788|   		case LDAP_BACK_CFG_FILTER:
# 1789|   			if ( c->valx < 0 ) {
# 1790|-> 				asyncmeta_filter_destroy( mt->mt_filter );
# 1791|   				mt->mt_filter = NULL;
# 1792|   			} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def447]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1790:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1788|   		case LDAP_BACK_CFG_FILTER:
# 1789|   			if ( c->valx < 0 ) {
# 1790|-> 				asyncmeta_filter_destroy( mt->mt_filter );
# 1791|   				mt->mt_filter = NULL;
# 1792|   			} else {

Error: CLANG_WARNING: [#def448]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1794:44: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'mprev')
# 1792|   			} else {
# 1793|   				metafilter_t *mf, **mprev;
# 1794|-> 				for (i=0, mprev = &mt->mt_filter, mf = *mprev; mf; mf = *mprev) {
# 1795|   					if ( i == c->valx ) {
# 1796|   						*mprev = mf->mf_next;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def449]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1794:70: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1792|   			} else {
# 1793|   				metafilter_t *mf, **mprev;
# 1794|-> 				for (i=0, mprev = &mt->mt_filter, mf = *mprev; mf; mf = *mprev) {
# 1795|   					if ( i == c->valx ) {
# 1796|   						*mprev = mf->mf_next;

Error: CLANG_WARNING: [#def450]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1829:37: warning[core.NullDereference]: Dereference of null pointer
# 1827|   				rc = 1;
# 1828|   			} else {
# 1829|-> 				mt->mt_tls.sb_keepalive.sk_idle = 0;
# 1830|   				mt->mt_tls.sb_keepalive.sk_probes = 0;
# 1831|   				mt->mt_tls.sb_keepalive.sk_interval = 0;

Error: CLANG_WARNING: [#def451]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1836:35: warning[core.NullDereference]: Dereference of null pointer
# 1834|   
# 1835|   		case LDAP_BACK_CFG_TCP_USER_TIMEOUT:
# 1836|-> 			mt->mt_tls.sb_tcp_user_timeout = 0;
# 1837|   			break;
# 1838|   

Error: CLANG_WARNING: [#def452]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1916:16: warning[core.NullDereference]: Array access (from variable 'uris') results in a null pointer dereference
# 1914|   		mt = ch_calloc( sizeof( a_metatarget_t ), 1 );
# 1915|   
# 1916|-> 		for ( j = 0; uris[ j ] != NULL; j++ ) {
# 1917|   			char *tmpuri = NULL;
# 1918|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def453]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:1916:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘uris’
# 1914|   		mt = ch_calloc( sizeof( a_metatarget_t ), 1 );
# 1915|   
# 1916|-> 		for ( j = 0; uris[ j ] != NULL; j++ ) {
# 1917|   			char *tmpuri = NULL;
# 1918|   

Error: COMPILER_WARNING: [#def454]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c: scope_hint: In function ‘asyncmeta_back_cf_gen’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2105:75: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
# 2105 |                                 "regular expression \"%s\" bad because of %s",
#      |                                                                           ^~
# 2106 |                                 c->argv[1], regerr );
#      |                                             ~~~~~~                         
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
# 2103|   			regerror( rc, &mf->mf_regex, regerr, sizeof(regerr) );
# 2104|   			snprintf( c->cr_msg, sizeof( c->cr_msg ),
# 2105|-> 				"regular expression \"%s\" bad because of %s",
# 2106|   				c->argv[1], regerr );
# 2107|   			ch_free( mf );

Error: CLANG_WARNING: [#def455]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2111:30: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'm2')
# 2109|   		}
# 2110|   		ber_str2bv( c->argv[1], 0, 1, &mf->mf_regex_pattern );
# 2111|-> 		for ( m2 = &mt->mt_filter; *m2; m2 = &(*m2)->mf_next )
# 2112|   			;
# 2113|   		*m2 = mf;

Error: CLANG_WARNING: [#def456]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2218:26: warning[core.NullDereference]: Access to field 'mc_network_timeout' results in a dereference of a null pointer (loaded from variable 'mc')
# 2216|   			return 1;
# 2217|   		}
# 2218|-> 		mc->mc_network_timeout = (time_t)t;
# 2219|   		} break;
# 2220|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def457]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2218:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2216|   			return 1;
# 2217|   		}
# 2218|-> 		mc->mc_network_timeout = (time_t)t;
# 2219|   		} break;
# 2220|   

Error: CLANG_WARNING: [#def458]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2238:30: warning[core.NullDereference]: Dereference of null pointer
# 2236|   	case LDAP_BACK_CFG_BIND_TIMEOUT:
# 2237|   	/* bind timeout when connecting to ldap servers */
# 2238|-> 		mc->mc_bind_timeout.tv_sec = c->value_ulong/1000000;
# 2239|   		mc->mc_bind_timeout.tv_usec = c->value_ulong%1000000;
# 2240|   		break;

Error: CLANG_WARNING: [#def459]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2245:17: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2243|   	/* save bind creds for referral rebinds? */
# 2244|   		if ( c->argc == 1 || c->value_int ) {
# 2245|-> 			mc->mc_flags |= LDAP_BACK_F_SAVECRED;
# 2246|   		} else {
# 2247|   			mc->mc_flags &= ~LDAP_BACK_F_SAVECRED;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def460]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2245:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2243|   	/* save bind creds for referral rebinds? */
# 2244|   		if ( c->argc == 1 || c->value_int ) {
# 2245|-> 			mc->mc_flags |= LDAP_BACK_F_SAVECRED;
# 2246|   		} else {
# 2247|   			mc->mc_flags &= ~LDAP_BACK_F_SAVECRED;

Error: CLANG_WARNING: [#def461]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2247:17: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2245|   			mc->mc_flags |= LDAP_BACK_F_SAVECRED;
# 2246|   		} else {
# 2247|-> 			mc->mc_flags &= ~LDAP_BACK_F_SAVECRED;
# 2248|   		}
# 2249|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def462]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2247:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2245|   			mc->mc_flags |= LDAP_BACK_F_SAVECRED;
# 2246|   		} else {
# 2247|-> 			mc->mc_flags &= ~LDAP_BACK_F_SAVECRED;
# 2248|   		}
# 2249|   		break;

Error: CLANG_WARNING: [#def463]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2253:17: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2251|   	case LDAP_BACK_CFG_CHASE:
# 2252|   		if ( c->argc == 1 || c->value_int ) {
# 2253|-> 			mc->mc_flags |= LDAP_BACK_F_CHASE_REFERRALS;
# 2254|   		} else {
# 2255|   			mc->mc_flags &= ~LDAP_BACK_F_CHASE_REFERRALS;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def464]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2253:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2251|   	case LDAP_BACK_CFG_CHASE:
# 2252|   		if ( c->argc == 1 || c->value_int ) {
# 2253|-> 			mc->mc_flags |= LDAP_BACK_F_CHASE_REFERRALS;
# 2254|   		} else {
# 2255|   			mc->mc_flags &= ~LDAP_BACK_F_CHASE_REFERRALS;

Error: CLANG_WARNING: [#def465]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2255:17: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2253|   			mc->mc_flags |= LDAP_BACK_F_CHASE_REFERRALS;
# 2254|   		} else {
# 2255|-> 			mc->mc_flags &= ~LDAP_BACK_F_CHASE_REFERRALS;
# 2256|   		}
# 2257|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def466]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2255:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2253|   			mc->mc_flags |= LDAP_BACK_F_CHASE_REFERRALS;
# 2254|   		} else {
# 2255|-> 			mc->mc_flags &= ~LDAP_BACK_F_CHASE_REFERRALS;
# 2256|   		}
# 2257|   		break;

Error: CLANG_WARNING: [#def467]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2268:16: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2266|   			return 1;
# 2267|   		}
# 2268|-> 		mc->mc_flags &= ~LDAP_BACK_F_TLS_MASK;
# 2269|   		mc->mc_flags |= tls_mode[i].mask;
# 2270|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def468]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2268:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2266|   			return 1;
# 2267|   		}
# 2268|-> 		mc->mc_flags &= ~LDAP_BACK_F_TLS_MASK;
# 2269|   		mc->mc_flags |= tls_mode[i].mask;
# 2270|   

Error: CLANG_WARNING: [#def469]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2296:16: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2294|   			return 1;
# 2295|   		}
# 2296|-> 		mc->mc_flags &= ~LDAP_BACK_F_T_F_MASK2;
# 2297|   		mc->mc_flags |= t_f_mode[i].mask;
# 2298|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def470]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2296:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2294|   			return 1;
# 2295|   		}
# 2296|-> 		mc->mc_flags &= ~LDAP_BACK_F_T_F_MASK2;
# 2297|   		mc->mc_flags |= t_f_mode[i].mask;
# 2298|   		break;

Error: CLANG_WARNING: [#def471]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2359:16: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2357|   			return 1;
# 2358|   		}
# 2359|-> 		mc->mc_flags &= ~LDAP_BACK_F_CANCEL_MASK2;
# 2360|   		mc->mc_flags |= cancel_mode[i].mask;
# 2361|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def472]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2359:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2357|   			return 1;
# 2358|   		}
# 2359|-> 		mc->mc_flags &= ~LDAP_BACK_F_CANCEL_MASK2;
# 2360|   		mc->mc_flags |= cancel_mode[i].mask;
# 2361|   		break;

Error: CLANG_WARNING: [#def473]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2378:26: warning[core.NullDereference]: Array access (via field 'mc_timeout') results in a null pointer dereference
# 2376|   
# 2377|   				for ( j = 0; j < SLAP_OP_LAST; j++ ) {
# 2378|-> 					mc->mc_timeout[ j ] = u;
# 2379|   				}
# 2380|   

Error: CLANG_WARNING: [#def474]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2406:8: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2404|   	case LDAP_BACK_CFG_QUARANTINE:
# 2405|   	/* quarantine */
# 2406|-> 		if ( META_BACK_CMN_QUARANTINE( mc ) )
# 2407|   		{
# 2408|   			snprintf( c->cr_msg, sizeof( c->cr_msg ),

Error: CLANG_WARNING: [#def475]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2434:17: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2432|   	/* session tracking request */
# 2433|   		if ( c->value_int ) {
# 2434|-> 			mc->mc_flags |= LDAP_BACK_F_ST_REQUEST;
# 2435|   		} else {
# 2436|   			mc->mc_flags &= ~LDAP_BACK_F_ST_REQUEST;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def476]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2434:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2432|   	/* session tracking request */
# 2433|   		if ( c->value_int ) {
# 2434|-> 			mc->mc_flags |= LDAP_BACK_F_ST_REQUEST;
# 2435|   		} else {
# 2436|   			mc->mc_flags &= ~LDAP_BACK_F_ST_REQUEST;

Error: CLANG_WARNING: [#def477]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2436:17: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2434|   			mc->mc_flags |= LDAP_BACK_F_ST_REQUEST;
# 2435|   		} else {
# 2436|-> 			mc->mc_flags &= ~LDAP_BACK_F_ST_REQUEST;
# 2437|   		}
# 2438|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def478]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2436:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2434|   			mc->mc_flags |= LDAP_BACK_F_ST_REQUEST;
# 2435|   		} else {
# 2436|-> 			mc->mc_flags &= ~LDAP_BACK_F_ST_REQUEST;
# 2437|   		}
# 2438|   		break;

Error: CLANG_WARNING: [#def479]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2464:19: warning[core.NullDereference]: Access to field 'mc_nretries' results in a dereference of a null pointer (loaded from variable 'mc')
# 2462|   		}
# 2463|   
# 2464|-> 		mc->mc_nretries = nretries;
# 2465|   		} break;
# 2466|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def480]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2464:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2462|   		}
# 2463|   
# 2464|-> 		mc->mc_nretries = nretries;
# 2465|   		} break;
# 2466|   

Error: CLANG_WARNING: [#def481]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2475:18: warning[core.NullDereference]: Access to field 'mc_version' results in a dereference of a null pointer (loaded from variable 'mc')
# 2473|   			return 1;
# 2474|   		}
# 2475|-> 		mc->mc_version = c->value_int;
# 2476|   		break;
# 2477|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def482]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2475:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2473|   			return 1;
# 2474|   		}
# 2475|-> 		mc->mc_version = c->value_int;
# 2476|   		break;
# 2477|   

Error: CLANG_WARNING: [#def483]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2481:17: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2479|   	/* do not return search references */
# 2480|   		if ( c->value_int ) {
# 2481|-> 			mc->mc_flags |= LDAP_BACK_F_NOREFS;
# 2482|   		} else {
# 2483|   			mc->mc_flags &= ~LDAP_BACK_F_NOREFS;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def484]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2481:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2479|   	/* do not return search references */
# 2480|   		if ( c->value_int ) {
# 2481|-> 			mc->mc_flags |= LDAP_BACK_F_NOREFS;
# 2482|   		} else {
# 2483|   			mc->mc_flags &= ~LDAP_BACK_F_NOREFS;

Error: CLANG_WARNING: [#def485]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2483:17: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2481|   			mc->mc_flags |= LDAP_BACK_F_NOREFS;
# 2482|   		} else {
# 2483|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOREFS;
# 2484|   		}
# 2485|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def486]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2483:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2481|   			mc->mc_flags |= LDAP_BACK_F_NOREFS;
# 2482|   		} else {
# 2483|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOREFS;
# 2484|   		}
# 2485|   		break;

Error: CLANG_WARNING: [#def487]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2490:17: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2488|   	/* do not propagate undefined search filters */
# 2489|   		if ( c->value_int ) {
# 2490|-> 			mc->mc_flags |= LDAP_BACK_F_NOUNDEFFILTER;
# 2491|   		} else {
# 2492|   			mc->mc_flags &= ~LDAP_BACK_F_NOUNDEFFILTER;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def488]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2490:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2488|   	/* do not propagate undefined search filters */
# 2489|   		if ( c->value_int ) {
# 2490|-> 			mc->mc_flags |= LDAP_BACK_F_NOUNDEFFILTER;
# 2491|   		} else {
# 2492|   			mc->mc_flags &= ~LDAP_BACK_F_NOUNDEFFILTER;

Error: CLANG_WARNING: [#def489]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2492:17: warning[core.NullDereference]: Access to field 'mc_flags' results in a dereference of a null pointer (loaded from variable 'mc')
# 2490|   			mc->mc_flags |= LDAP_BACK_F_NOUNDEFFILTER;
# 2491|   		} else {
# 2492|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOUNDEFFILTER;
# 2493|   		}
# 2494|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def490]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2492:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2490|   			mc->mc_flags |= LDAP_BACK_F_NOUNDEFFILTER;
# 2491|   		} else {
# 2492|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOUNDEFFILTER;
# 2493|   		}
# 2494|   		break;

Error: CLANG_WARNING: [#def491]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/config.c:2522:34: warning[core.NullDereference]: Dereference of null pointer
# 2520|   
# 2521|   	case LDAP_BACK_CFG_TCP_USER_TIMEOUT:
# 2522|-> 		mt->mt_tls.sb_tcp_user_timeout = c->value_uint;
# 2523|   		break;
# 2524|   

Error: CPPCHECK_WARNING: [#def492]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/conn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def493]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/delete.c:178:8: warning[deadcode.DeadStores]: Value stored to 'thrctx' during its initialization is never read
#  176|   	a_metaconn_t	*mc;
#  177|   	int		rc, candidate = -1;
#  178|-> 	void *thrctx = op->o_threadctx;
#  179|   	bm_context_t *bc;
#  180|   	SlapReply *candidates;

Error: COMPILER_WARNING (CWE-563): [#def494]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/delete.c: scope_hint: In function ‘asyncmeta_back_delete’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/delete.c:178:15: warning[-Wunused-variable]: unused variable ‘thrctx’
#  178 |         void *thrctx = op->o_threadctx;
#      |               ^~~~~~
#  176|   	a_metaconn_t	*mc;
#  177|   	int		rc, candidate = -1;
#  178|-> 	void *thrctx = op->o_threadctx;
#  179|   	bm_context_t *bc;
#  180|   	SlapReply *candidates;

Error: CPPCHECK_WARNING (CWE-457): [#def495]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/dncache.c:105: error[uninitvar]: Uninitialized variables: tmp_entry.target, tmp_entry.lastupdated
#  103|   	ldap_pvt_thread_mutex_lock( &cache->mutex );
#  104|   	entry = ( metadncacheentry_t * )ldap_avl_find( cache->tree,
#  105|-> 			( caddr_t )&tmp_entry, asyncmeta_dncache_cmp );
#  106|   
#  107|   	if ( entry != NULL ) {

Error: CPPCHECK_WARNING (CWE-457): [#def496]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/dncache.c:161: warning[uninitvar]: Uninitialized variables: tmp_entry.target, tmp_entry.lastupdated
#  159|   	ldap_pvt_thread_mutex_lock( &cache->mutex );
#  160|   	entry = ( metadncacheentry_t * )ldap_avl_find( cache->tree,
#  161|-> 			( caddr_t )&tmp_entry, asyncmeta_dncache_cmp );
#  162|   
#  163|   	if ( entry != NULL ) {

Error: CPPCHECK_WARNING (CWE-457): [#def497]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/dncache.c:206: error[uninitvar]: Uninitialized variables: tmp_entry.target, tmp_entry.lastupdated
#  204|   
#  205|   	ldap_pvt_thread_mutex_lock( &cache->mutex );
#  206|-> 	entry = ldap_avl_delete( &cache->tree, ( caddr_t )&tmp_entry,
#  207|   			asyncmeta_dncache_cmp );
#  208|   	ldap_pvt_thread_mutex_unlock( &cache->mutex );

Error: CPPCHECK_WARNING: [#def498]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/map.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def499]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/message_queue.c:210:9: warning[core.NullDereference]: Access to field 'bc_mc' results in a dereference of a null pointer (loaded from variable 'bc')
#  208|   	}
#  209|   	assert(om == bc);
#  210|-> 	assert(bc->bc_mc == mc);
#  211|   }
#  212|   

Error: CPPCHECK_WARNING: [#def500]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/meta_result.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def501]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/meta_result.c:254:39: warning[-Wformat-overflow=]: ‘%s’ directive argument is null
#  254 |                                       "%s meta_send_entry(\"%s\"): " "slap_bv2undef_ad(%s): %s\n",
#      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  252|   			{
#  253|   				Debug(LDAP_DEBUG_ANY,
#  254|-> 				      "%s meta_send_entry(\"%s\"): " "slap_bv2undef_ad(%s): %s\n",
#  255|   				      op->o_log_prefix, ent.e_name.bv_val,
#  256|   				      mapped.bv_val, text );

Error: CLANG_WARNING: [#def502]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/meta_result.c:699:4: warning[core.NullDereference]: Dereference of null pointer
#  697|   		if (bc->op->o_tag != LDAP_REQ_SEARCH || (META_BACK_ONERR_STOP( mi )) ||
#  698|   		    (asyncmeta_is_last_result(mc, bc, candidate) == 0)) {
#  699|-> 			LDAP_STAILQ_REMOVE(&mc->mc_om_list, bc, bm_context_t, bc_next);
#  700|   			bc->op->o_threadctx = ctx;
#  701|   			bc->op->o_tid = ldap_pvt_thread_pool_tid( ctx );

Error: CLANG_WARNING: [#def503]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/meta_result.c:928:5: warning[deadcode.DeadStores]: Value stored to 'sres' is never read
#  926|   			if ( rs->sr_err != LDAP_SUCCESS ) {
#  927|   				candidates[ i ].sr_err = rs->sr_err;
#  928|-> 				sres = slap_map_api2result( &candidates[ i ] );
#  929|   				candidates[ i ].sr_type = REP_RESULT;
#  930|   				goto finish;

Error: CLANG_WARNING: [#def504]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/meta_result.c:1683:5: warning[core.NullDereference]: Dereference of null pointer
# 1681|   				operation_counter_init( op, ctx );
# 1682|   
# 1683|-> 				LDAP_STAILQ_REMOVE(&mc->mc_om_list, bc, bm_context_t, bc_next);
# 1684|   				mc->pending_ops--;
# 1685|   				for (j=0; j<mi->mi_ntargets; j++) {

Error: CLANG_WARNING: [#def505]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/meta_result.c:1700:5: warning[core.NullDereference]: Dereference of null pointer
# 1698|   			}
# 1699|   			if (bc->bc_invalid) {
# 1700|-> 				LDAP_STAILQ_REMOVE(&mc->mc_om_list, bc, bm_context_t, bc_next);
# 1701|   				mc->pending_ops--;
# 1702|   				LDAP_STAILQ_INSERT_TAIL( &timeout_list, bc, bc_next);

Error: CLANG_WARNING: [#def506]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/meta_result.c:1708:5: warning[core.NullDereference]: Dereference of null pointer
# 1706|   			if (bc->timeout && bc->stoptime < current_time) {
# 1707|   				Operation *op = bc->op;
# 1708|-> 				LDAP_STAILQ_REMOVE(&mc->mc_om_list, bc, bm_context_t, bc_next);
# 1709|   				mc->pending_ops--;
# 1710|   				LDAP_STAILQ_INSERT_TAIL( &timeout_list, bc, bc_next);

Error: CPPCHECK_WARNING: [#def507]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/modify.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def508]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/modify.c:235:8: warning[deadcode.DeadStores]: Value stored to 'thrctx' during its initialization is never read
#  233|   	a_metaconn_t	*mc;
#  234|   	int		rc, candidate = -1;
#  235|-> 	void *thrctx = op->o_threadctx;
#  236|   	bm_context_t *bc;
#  237|   	SlapReply *candidates;

Error: COMPILER_WARNING (CWE-563): [#def509]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/modify.c: scope_hint: In function ‘asyncmeta_back_modify’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/modify.c:235:15: warning[-Wunused-variable]: unused variable ‘thrctx’
#  235 |         void *thrctx = op->o_threadctx;
#      |               ^~~~~~
#  233|   	a_metaconn_t	*mc;
#  234|   	int		rc, candidate = -1;
#  235|-> 	void *thrctx = op->o_threadctx;
#  236|   	bm_context_t *bc;
#  237|   	SlapReply *candidates;

Error: CPPCHECK_WARNING: [#def510]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/modrdn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def511]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/modrdn.c:249:8: warning[deadcode.DeadStores]: Value stored to 'thrctx' during its initialization is never read
#  247|   	a_metaconn_t	*mc;
#  248|   	int		rc, candidate = -1;
#  249|-> 	void *thrctx = op->o_threadctx;
#  250|   	bm_context_t *bc;
#  251|   	SlapReply *candidates;

Error: COMPILER_WARNING (CWE-563): [#def512]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/modrdn.c: scope_hint: In function ‘asyncmeta_back_modrdn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/modrdn.c:249:15: warning[-Wunused-variable]: unused variable ‘thrctx’
#  249 |         void *thrctx = op->o_threadctx;
#      |               ^~~~~~
#  247|   	a_metaconn_t	*mc;
#  248|   	int		rc, candidate = -1;
#  249|-> 	void *thrctx = op->o_threadctx;
#  250|   	bm_context_t *bc;
#  251|   	SlapReply *candidates;

Error: COMPILER_WARNING (CWE-563): [#def513]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/search.c: scope_hint: In function ‘asyncmeta_back_search’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/search.c:681:15: warning[-Wunused-variable]: unused variable ‘thrctx’
#  681 |         void *thrctx = op->o_threadctx;
#      |               ^~~~~~
#  679|   	long		i;
#  680|   	SlapReply	*candidates = NULL;
#  681|-> 	void *thrctx = op->o_threadctx;
#  682|   	bm_context_t *bc;
#  683|   	a_metaconn_t *mc;

Error: COMPILER_WARNING: [#def514]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def515]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_asyncmeta 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CLANG_WARNING: [#def516]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/referral.c:112:24: warning[core.NullDereference]: Dereference of null pointer
#  110|   	    "%s DNSSRV p=%d dn=\"%s\" url=\"%s\"\n",
#  111|   	    op->o_log_prefix, op->o_protocol,
#  112|-> 		op->o_req_dn.bv_val, urls[0].bv_val );
#  113|   
#  114|   	Debug( LDAP_DEBUG_TRACE, "DNSSRV: dn=\"%s\" -> url=\"%s\"\n",

Error: CLANG_WARNING: [#def517]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/referral.c:115:24: warning[core.NullDereference]: Dereference of null pointer
#  113|   
#  114|   	Debug( LDAP_DEBUG_TRACE, "DNSSRV: dn=\"%s\" -> url=\"%s\"\n",
#  115|-> 		op->o_req_dn.bv_val, urls[0].bv_val );
#  116|   
#  117|   	rs->sr_ref = urls;

Error: CLANG_WARNING: [#def518]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:122:51: warning[core.NullDereference]: Dereference of null pointer
#  120|   	    "%s DNSSRV p=%d dn=\"%s\" url=\"%s\"\n",
#  121|   	    op->o_log_prefix, op->o_protocol,
#  122|-> 		op->o_req_dn.bv_len ? op->o_req_dn.bv_val : "", urls[0].bv_val );
#  123|   
#  124|   	Debug( LDAP_DEBUG_TRACE,

Error: CLANG_WARNING: [#def519]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/search.c:128:3: warning[core.NullDereference]: Dereference of null pointer
#  126|   		op->oq_search.rs_scope,
#  127|   		op->o_req_dn.bv_len ? op->o_req_dn.bv_val : "",
#  128|-> 		urls[0].bv_val );
#  129|   
#  130|   	rc = ldap_domain2dn(domain, &refdn);

Error: COMPILER_WARNING: [#def520]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def521]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-dnssrv/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_dnssrv 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-457): [#def522]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/meta_result.c:31: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/meta_result.c: scope_hint: In function ‘asyncmeta_op_handle_result’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:111:42: warning[-Wmaybe-uninitialized]: ‘msc’ may be used uninitialized
#  111 | #define LDAP_BACK_CONN_ISSET_F(fp,f)    (*(fp) & (f))
#      |                                          ^~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-asyncmeta/meta_result.c:1486:29: note: ‘msc’ was declared here
# 1486 |         a_metasingleconn_t *msc;
#      |                             ^~~
#  109|   
#  110|   	unsigned		lc_lcflags;
#  111|-> #define LDAP_BACK_CONN_ISSET_F(fp,f)	(*(fp) & (f))
#  112|   #define	LDAP_BACK_CONN_SET_F(fp,f)	(*(fp) |= (f))
#  113|   #define	LDAP_BACK_CONN_CLEAR_F(fp,f)	(*(fp) &= ~(f))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def523]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c: scope_hint: In function ‘meta_back_getconn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:112:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘metaconn_alloc(op)’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:124:41: note: in expansion of macro ‘LDAP_BACK_CONN_SET_F’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:150:49: note: in expansion of macro ‘LDAP_BACK_CONN_SET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1244:33: note: in expansion of macro ‘LDAP_BACK_CONN_ISPRIV_SET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1052:17: note: in expansion of macro ‘LDAP_BACK_PCONN_ROOTDN_SET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_queue.h:394:34: note: in definition of macro ‘LDAP_TAILQ_FIRST’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1086:25: note: in expansion of macro ‘LDAP_TAILQ_FOREACH’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1087:52: note: in expansion of macro ‘LDAP_BACK_CONN2PRIV’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:340:46: note: in definition of macro ‘LDAP_BACK_ISSET_F’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/back-meta.h:449:33: note: in expansion of macro ‘mi_flags’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:343:66: note: in expansion of macro ‘li_flags’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:362:41: note: in expansion of macro ‘LDAP_BACK_ISSET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1107:38: note: in expansion of macro ‘LDAP_BACK_USE_TEMPORARIES’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1237:47: note: in expansion of macro ‘mc_conn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:123:41: note: in expansion of macro ‘LDAP_BACK_CONN_ISSET_F’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:149:49: note: in expansion of macro ‘LDAP_BACK_CONN_ISSET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1243:30: note: in expansion of macro ‘LDAP_BACK_CONN_ISPRIV’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:124:41: note: in expansion of macro ‘LDAP_BACK_CONN_SET_F’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:150:49: note: in expansion of macro ‘LDAP_BACK_CONN_SET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1244:33: note: in expansion of macro ‘LDAP_BACK_CONN_ISPRIV_SET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:124:41: note: in expansion of macro ‘LDAP_BACK_CONN_SET_F’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:150:49: note: in expansion of macro ‘LDAP_BACK_CONN_SET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1244:33: note: in expansion of macro ‘LDAP_BACK_CONN_ISPRIV_SET’
#  110|   	unsigned		lc_lcflags;
#  111|   #define LDAP_BACK_CONN_ISSET_F(fp,f)	(*(fp) & (f))
#  112|-> #define	LDAP_BACK_CONN_SET_F(fp,f)	(*(fp) |= (f))
#  113|   #define	LDAP_BACK_CONN_CLEAR_F(fp,f)	(*(fp) &= ~(f))
#  114|   #define	LDAP_BACK_CONN_CPY_F(fp,f,mfp) \

Error: CPPCHECK_WARNING: [#def524]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/bind.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-562): [#def525]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/bind.c:1369: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1367|   	cb.sc_private = &o_tag;
# 1368|   	cb.sc_response = ldap_back_dobind_cb;
# 1369|-> 	op->o_callback = &cb;
# 1370|   
# 1371|   	if ( LDAP_BACK_CONN_ISIDASSERT( lc ) ) {

Error: CPPCHECK_WARNING: [#def526]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-562): [#def527]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c:1029: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1027|   	db = *op->o_bd;
# 1028|   	SLAP_DBFLAGS( &db ) &= ~SLAP_DBFLAG_MONITORING;
# 1029|-> 	op->o_bd = &db;
# 1030|   
# 1031|   	text = rs->sr_text;

Error: CPPCHECK_WARNING (CWE-562): [#def528]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c:1046: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1044|   	sc2.sc_private = &lb;
# 1045|   	sc2.sc_response = ldap_chain_cb_response;
# 1046|-> 	op->o_callback = &sc2;
# 1047|   
# 1048|   	/* Chaining can be performed by a privileged user on behalf

Error: COMPILER_WARNING (CWE-665): [#def529]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c:1260:33: warning[-Wmissing-braces]: missing braces around initializer
# 1260 | static ConfigTable chaincfg[] = {
#      |                                 ^
# 1258|   #endif
# 1259|   
# 1260|-> static ConfigTable chaincfg[] = {
# 1261|   #ifdef LDAP_CONTROL_X_CHAINING_BEHAVIOR
# 1262|   	{ "chain-chaining", "args",

Error: GCC_ANALYZER_WARNING (CWE-476): [#def530]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c: scope_hint: In function ‘ldap_chain_db_init_common’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c:2062:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘li’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c:23: included_from: Included from here.
# 2060|   	}
# 2061|   	li = (ldapinfo_t *)be->be_private;
# 2062|-> 	li->li_urllist_f = NULL;
# 2063|   	li->li_urllist_p = NULL;
# 2064|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def531]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c: scope_hint: In function ‘ldap_chain_db_init_one’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c:2097:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘li’
# 2095|   	}
# 2096|   	li = (ldapinfo_t *)be->be_private;
# 2097|-> 	li->li_urllist_f = NULL;
# 2098|   	li->li_urllist_p = NULL;
# 2099|   

Error: CPPCHECK_WARNING (CWE-457): [#def532]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c:2179: warning[uninitvar]: Uninitialized variable: rc
# 2177|   	be->be_private = private;
# 2178|   
# 2179|-> 	return rc;
# 2180|   }
# 2181|   

Error: CLANG_WARNING: [#def533]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c:2179:2: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
# 2177|   	be->be_private = private;
# 2178|   
# 2179|-> 	return rc;
# 2180|   }
# 2181|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def534]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c: scope_hint: In function ‘ldap_chain_connection_destroy’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c:2179:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘rc’
# 2177|   	be->be_private = private;
# 2178|   
# 2179|-> 	return rc;
# 2180|   }
# 2181|   

Error: COMPILER_WARNING (CWE-457): [#def535]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c: scope_hint: In function ‘ldap_chain_connection_destroy’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c:2179:16: warning[-Wmaybe-uninitialized]: ‘rc’ may be used uninitialized
# 2179 |         return rc;
#      |                ^~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/chain.c:2159:33: note: ‘rc’ was declared here
# 2159 |         int                     rc;
#      |                                 ^~
# 2177|   	be->be_private = private;
# 2178|   
# 2179|-> 	return rc;
# 2180|   }
# 2181|   

Error: CPPCHECK_WARNING: [#def536]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/config.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def537]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/config.c:77:32: warning[-Wmissing-braces]: missing braces around initializer
#   77 | static ConfigTable ldapcfg[] = {
#      |                                ^
#   75|   };
#   76|   
#   77|-> static ConfigTable ldapcfg[] = {
#   78|   	{ "uri", "uri", 2, 2, 0,
#   79|   		ARG_MAGIC|LDAP_BACK_CFG_URI,

Error: COMPILER_WARNING (CWE-665): [#def538]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/config.c:363:33: warning[-Wmissing-braces]: missing braces around initializer
#  363 | static ConfigTable pbindcfg[] = {
#      |                                 ^
#  361|   };
#  362|   
#  363|-> static ConfigTable pbindcfg[] = {
#  364|   	{ "uri", "uri", 2, 2, 0,
#  365|   		ARG_MAGIC|LDAP_BACK_CFG_URI,

Error: CLANG_WARNING: [#def539]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/config.c:1045:5: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read
# 1043|   				ptr = bv.bv_val;
# 1044|   				ptr = lutil_strcopy( ptr, buf );
# 1045|-> 				ptr = lutil_strncopy( ptr, ((*bvp)[ i ]).bv_val, ((*bvp)[ i ]).bv_len );
# 1046|   				value_add_one( &c->rvalue_vals, &bv );
# 1047|   			}

Error: CLANG_WARNING: [#def540]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/config.c:1085:7: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read
# 1083|   
# 1084|   						ptr = lutil_strcopy( bv.bv_val, "mode=" );
# 1085|-> 						ptr = lutil_strcopy( ptr, mode.bv_val );
# 1086|   					}
# 1087|   					break;

Error: GCC_ANALYZER_WARNING (CWE-465): [#def541]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/config.c: scope_hint: In function ‘ldap_back_cf_gen’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/config.c:1688:20: warning[-Wanalyzer-deref-before-check]: check of ‘ch_calloc(8, (long unsigned int)(i + 1))’ for NULL after already dereferencing it
# 1686|   
# 1687|   done_url:;
# 1688|-> 		if ( urllist ) {
# 1689|   			ldap_charray_free( urllist );
# 1690|   		}

Error: CLANG_WARNING: [#def542]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/delete.c:61:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#   59|   	rs->sr_err = ldap_delete_ext( lc->lc_ld, op->o_req_dn.bv_val,
#   60|   			ctrls, NULL, &msgid );
#   61|-> 	rc = ldap_back_op_result( lc, op, rs, msgid,
#   62|   		li->li_timeout[ SLAP_OP_DELETE ],
#   63|   		( LDAP_BACK_SENDRESULT | retrying ) );

Error: CPPCHECK_WARNING: [#def543]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def544]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c:326:37: warning[-Wmissing-braces]: missing braces around initializer
#  326 | static ConfigTable distproc_cfg[] = {
#      |                                     ^
#  324|   static ConfigLDAPadd distproc_ldadd;
#  325|   
#  326|-> static ConfigTable distproc_cfg[] = {
#  327|   	{ "distproc-chaining", "args",
#  328|   		2, 4, 0, ARG_MAGIC|ARG_BERVAL|DP_CHAINING, distproc_cfgen,

Error: COMPILER_WARNING (CWE-563): [#def545]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c: scope_hint: In function ‘distproc_cfadd’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c:497:49: warning[-Wunused-but-set-variable]: variable ‘lca’ set but not used
#  497 |                 ldap_distproc_cfadd_apply_t     lca = { 0 };
#      |                                                 ^~~
#  495|   
#  496|   	if ( lback->bi_cf_ocs ) {
#  497|-> 		ldap_distproc_cfadd_apply_t	lca = { 0 };
#  498|   
#  499|   		lca.op = op;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def546]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c: scope_hint: In function ‘ldap_distproc_db_init_one’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c:841:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘li’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c:23: included_from: Included from here.
#  839|   
#  840|   	/* copy common data */
#  841|-> 	li->li_nretries = lc->lc_common_li->li_nretries;
#  842|   	li->li_flags = lc->lc_common_li->li_flags;
#  843|   	li->li_version = lc->lc_common_li->li_version;

Error: CPPCHECK_WARNING (CWE-457): [#def547]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c:880: warning[uninitvar]: Uninitialized variable: rc
#  878|   	be->be_private = private;
#  879|   
#  880|-> 	return rc;
#  881|   }
#  882|   

Error: CLANG_WARNING: [#def548]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c:880:2: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
#  878|   	be->be_private = private;
#  879|   
#  880|-> 	return rc;
#  881|   }
#  882|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def549]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c: scope_hint: In function ‘ldap_distproc_connection_destroy’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c:880:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘rc’
#  878|   	be->be_private = private;
#  879|   
#  880|-> 	return rc;
#  881|   }
#  882|   

Error: COMPILER_WARNING (CWE-457): [#def550]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c: scope_hint: In function ‘ldap_distproc_connection_destroy’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c:880:16: warning[-Wmaybe-uninitialized]: ‘rc’ may be used uninitialized
#  880 |         return rc;
#      |                ^~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/distproc.c:861:33: note: ‘rc’ was declared here
#  861 |         int                     rc;
#      |                                 ^~
#  878|   	be->be_private = private;
#  879|   
#  880|-> 	return rc;
#  881|   }
#  882|   

Error: CPPCHECK_WARNING: [#def551]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/extended.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-704): [#def552]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/extended.c: scope_hint: In function ‘ldap_back_exop_passwd’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/extended.c:245:27: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘strcpy’ discards ‘const’ qualifier from pointer target type
#  245 |                 strcpy( rs->sr_text, text );
#      |                         ~~^~~~~~~~~
/usr/include/features.h:511: included_from: Included from here.
/usr/include/bits/types.h:26: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/fdset.h:32: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1187: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/extended.c:22: included_from: Included from here.
/usr/include/bits/string_fortified.h:77:16: note: expected ‘char *’ but argument is of type ‘const char *’
#   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
#      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  243|   		/* copy to tmpmem, doesn't need to be freed */
#  244|   		rs->sr_text = op->o_tmpalloc( strlen( text ) + 1, op->o_tmpmemctx );
#  245|-> 		strcpy( rs->sr_text, text );
#  246|   		ch_free( text );
#  247|   	}

Error: COMPILER_WARNING (CWE-704): [#def553]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/extended.c: scope_hint: In function ‘ldap_back_exop_generic’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/extended.c:372:27: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘strcpy’ discards ‘const’ qualifier from pointer target type
#  372 |                 strcpy( rs->sr_text, text );
#      |                         ~~^~~~~~~~~
/usr/include/bits/string_fortified.h:77:16: note: expected ‘char *’ but argument is of type ‘const char *’
#   77 | __NTH (strcpy (__fortify_clang_overload_arg (char *, __restrict, __dest),
#      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  370|   		/* copy to tmpmem, doesn't need to be freed */
#  371|   		rs->sr_text = op->o_tmpalloc( strlen( text ) + 1, op->o_tmpmemctx );
#  372|-> 		strcpy( rs->sr_text, text );
#  373|   		ch_free( text );
#  374|   	}

Error: CLANG_WARNING: [#def554]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/modify.c:61:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#   59|   			+ i*sizeof( LDAPMod ) );
#   60|   	if ( modv == NULL ) {
#   61|-> 		rc = LDAP_NO_MEMORY;
#   62|   		goto cleanup;
#   63|   	}

Error: CLANG_WARNING: [#def555]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/modify.c:106:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  104|   	rs->sr_err = ldap_modify_ext( lc->lc_ld, op->o_req_dn.bv_val, modv,
#  105|   			ctrls, NULL, &msgid );
#  106|-> 	rc = ldap_back_op_result( lc, op, rs, msgid,
#  107|   		li->li_timeout[ SLAP_OP_MODIFY ],
#  108|   		( LDAP_BACK_SENDRESULT | retrying ) );

Error: CLANG_WARNING: [#def556]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/modify.c:125:15: warning[core.NullDereference]: Array access (from variable 'modv') results in a null pointer dereference
#  123|   	(void)ldap_back_controls_free( op, rs, &ctrls );
#  124|   
#  125|-> 	for ( i = 0; modv[ i ]; i++ ) {
#  126|   		ch_free( modv[ i ]->mod_bvalues );
#  127|   	}

Error: CLANG_WARNING: [#def557]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/modrdn.c:94:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#   92|   			newrdn.bv_val, newSup,
#   93|   			op->orr_deleteoldrdn, ctrls, NULL, &msgid );
#   94|-> 	rc = ldap_back_op_result( lc, op, rs, msgid,
#   95|   		li->li_timeout[ SLAP_OP_MODRDN ],
#   96|   		( LDAP_BACK_SENDRESULT | retrying ) );

Error: CPPCHECK_WARNING: [#def558]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/monitor.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def559]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/monitor.c: scope_hint: In function ‘ldap_back_monitor_db_close’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/monitor.c:1040:42: warning[-Wunused-but-set-variable]: variable ‘mbe’ set but not used
# 1040 |                 monitor_extra_t         *mbe;
#      |                                          ^~~
# 1038|   	if ( li && !BER_BVISNULL( &li->li_monitor_info.lmi_ndn ) ) {
# 1039|   		BackendInfo		*mi;
# 1040|-> 		monitor_extra_t		*mbe;
# 1041|   
# 1042|   		/* check if monitor is configured and usable */

Error: CLANG_WARNING: [#def560]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/monitor.c:1045:5: warning[deadcode.DeadStores]: Value stored to 'mbe' is never read
# 1043|   		mi = backend_info( "monitor" );
# 1044|   		if ( mi && mi->bi_extra ) {
# 1045|->  			mbe = mi->bi_extra;
# 1046|   
# 1047|   			/*TODO

Error: CPPCHECK_WARNING: [#def561]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/search.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def562]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def563]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_ldap 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def564]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldif/ldif.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def565]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldif/ldif.c:166:32: warning[-Wmissing-braces]: missing braces around initializer
#  166 | static ConfigTable ldifcfg[] = {
#      |                                ^
#  164|   
#  165|   
#  166|-> static ConfigTable ldifcfg[] = {
#  167|   	{ "directory", "dir", 2, 2, 0, ARG_BERVAL|ARG_OFFSET,
#  168|   		(void *)offsetof(struct ldif_info, li_base_path),

Error: CPPCHECK_WARNING (CWE-562): [#def566]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldif/ldif.c:1457: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1455|    send_res:
# 1456|   	rs->sr_err = rc;
# 1457|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 1458|   	Debug( LDAP_DEBUG_TRACE, "ldif_back_add: err: %d text: %s\n",
# 1459|   		rc, rs->sr_text ? rs->sr_text : "" );

Error: CLANG_WARNING: [#def567]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldif/ldif.c:1503:6: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1501|   					/* FIXME: is it correct to abort
# 1502|   					 * operation if control fails? */
# 1503|-> 					rc = rs->sr_err;
# 1504|   				}
# 1505|   			}

Error: CPPCHECK_WARNING (CWE-562): [#def568]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldif/ldif.c:1542: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1540|   
# 1541|   	rs->sr_err = rc;
# 1542|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 1543|   	send_ldap_result( op, rs );
# 1544|   	slap_graduate_commit_csn( op );

Error: CPPCHECK_WARNING (CWE-562): [#def569]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldif/ldif.c:1646: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1644|   	ldap_pvt_thread_mutex_unlock( &li->li_modop_mutex );
# 1645|   	rs->sr_err = rc;
# 1646|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 1647|   	send_ldap_result( op, rs );
# 1648|   	slap_graduate_commit_csn( op );

Error: COMPILER_WARNING: [#def570]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldif/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def571]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldif/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_ldif 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def572]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def573]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c: scope_hint: In function ‘ainfo_insert’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c:73:16: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘x’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c:24: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c:332:21: note: in expansion of macro ‘IS_SLAP_INDEX’
#   71|   	mdb->mi_attrs = ch_realloc( mdb->mi_attrs, ( mdb->mi_nattrs+1 ) * 
#   72|   		sizeof( AttrInfo * ));
#   73|-> 	if ( x < mdb->mi_nattrs )
#   74|   		AC_MEMCPY( &mdb->mi_attrs[x+1], &mdb->mi_attrs[x],
#   75|   			( mdb->mi_nattrs - x ) * sizeof( AttrInfo *));

Error: CLANG_WARNING: [#def574]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c:163:10: warning[core.NullDereference]: Array access (from variable 'dbis') results in a null pointer dereference
#  161|   		if ( rc ) {
#  162|   			for ( i=0; i<mdb->mi_nattrs; i++ ) {
#  163|-> 				if ( dbis[i] ) {
#  164|   					mdb->mi_attrs[i]->ai_dbi = 0;
#  165|   					mdb->mi_attrs[i]->ai_indexmask |= MDB_INDEX_DELETING;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def575]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c: scope_hint: In function ‘mdb_attr_index_config’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c:432:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c:332:21: note: in expansion of macro ‘IS_SLAP_INDEX’
#  430|   			AttrInfo *b = mdb_attr_mask( mdb, ad );
#  431|   			/* If this is just a multival record, reuse it for index info */
#  432|-> 			if ( !( b->ai_indexmask || b->ai_newmask ) && b->ai_multi_lo < UINT_MAX ) {
#  433|   				b->ai_indexmask = a->ai_indexmask;
#  434|   				b->ai_newmask = a->ai_newmask;

Error: COMPILER_WARNING (CWE-1164): [#def576]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c: scope_hint: In function ‘mdb_attr_multi_config’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c:581:1: warning[-Wunused-label]: label ‘fail’ defined but not used
#  581 | fail:
#      | ^~~~
#  579|   					fname, lineno, c_reply->msg );
#  580|   			}
#  581|-> fail:
#  582|   			goto done;
#  583|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def577]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c: scope_hint: In function ‘mdb_attr_multi_config’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c:595:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  593|   			AttrInfo *b = mdb_attr_mask( mdb, ad );
#  594|   			/* If this is just an index record, reuse it for multival info */
#  595|-> 			if ( b->ai_multi_lo == UINT_MAX ) {
#  596|   				b->ai_multi_hi = a->ai_multi_hi;
#  597|   				b->ai_multi_lo = a->ai_multi_lo;

Error: CLANG_WARNING: [#def578]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c:763:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  761|   		rc = slap_bv2ad( &bdata, &ad, &text );
#  762|   		if ( rc ) {
#  763|-> 			rc = slap_bv2undef_ad( &bdata, &mdb->mi_ads[i], &text, 0 );
#  764|   		} else {
#  765|   			if ( ad->ad_index >= MDB_MAXADS ) {

Error: COMPILER_WARNING (CWE-1164): [#def579]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c: scope_hint: In function ‘mdb_ad_read’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/attr.c:778:1: warning[-Wunused-label]: label ‘done’ defined but not used
#  778 | done:
#      | ^~~~
#  776|   	mdb->mi_numads = i-1;
#  777|   
#  778|-> done:
#  779|   	if ( rc == MDB_NOTFOUND )
#  780|   		rc = 0;

Error: CPPCHECK_WARNING: [#def580]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/config.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def581]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/config.c:50:31: warning[-Wmissing-braces]: missing braces around initializer
#   50 | static ConfigTable mdbcfg[] = {
#      |                               ^
#   48|   };
#   49|   
#   50|-> static ConfigTable mdbcfg[] = {
#   51|   	{ "idlexp", "log", 2, 2, 0, ARG_UINT|ARG_MAGIC|MDB_IDLEXP,
#   52|   		mdb_bk_cfg, "( OLcfgBkAt:12.1 NAME 'olcBkMdbIdlExp' "

Error: CLANG_WARNING: [#def582]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/config.c:270:4: warning[deadcode.DeadStores]: Value stored to 'getnext' is never read
#  268|   		}
#  269|   		if ( getnext ) {
#  270|-> 			getnext = 0;
#  271|   			key.mv_data = &id;
#  272|   			rc = mdb_cursor_get( curs, &key, &data, MDB_SET_RANGE );

Error: CLANG_WARNING: [#def583]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/config.c:276:6: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  274|   				mdb_txn_abort( txn );
#  275|   				if ( rc == MDB_NOTFOUND )
#  276|-> 					rc = 0;
#  277|   				break;
#  278|   			}

Error: CPPCHECK_WARNING (CWE-562): [#def584]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/config.c:412: error[invalidLifetime]: Using object that points to local variable 'mask' that is out of scope.
#  410|   		ID id = 0;
#  411|   		s = 0;			/* key 0 records next entryID to index */
#  412|-> 		data.mv_size = sizeof( ID );
#  413|   		data.mv_data = &id;
#  414|   		rc = mdb_cursor_put( curs, &key, &data, 0 );

Error: CLANG_WARNING: [#def585]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/config.c:444:10: warning[deadcode.DeadStores]: Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc'
#  442|   		return 0;
#  443|   
#  444|-> 	while(( rc = mdb_cursor_get( curs, &key, &data, MDB_NEXT )) == 0) {
#  445|   		s = key.mv_data;
#  446|   		if ( !*s )

Error: COMPILER_WARNING: [#def586]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/config.c: scope_hint: In function ‘mdb_cf_gen’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/config.c:883:68: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 4123 bytes into a region of size 256
#  883 |                         snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s: invalid path: %s",
#      |                                                                    ^~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 17 and 4267 bytes into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  881|   			char ebuf[128];
#  882|   			int saved_errno = errno;
#  883|-> 			snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s: invalid path: %s",
#  884|   				c->log, AC_STRERROR_R( saved_errno, ebuf, sizeof(ebuf) ) );
#  885|   			Debug( LDAP_DEBUG_ANY, "%s\n", c->cr_msg );

Error: CLANG_WARNING: [#def587]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/config.c:919:6: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  917|   					mdb->mi_flags |= MDB_RE_OPEN;
#  918|   					config_push_cleanup( c, mdb_cf_cleanup );
#  919|-> 					rc = 0;
#  920|   				}
#  921|   				mdb->mi_dbenv_flags |= mdb_envflags[j].mask;

Error: CLANG_WARNING: [#def588]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/delete.c:151:31: warning[core.NullDereference]: Dereference of null pointer
#  149|   			op->o_req_dn.bv_val );
#  150|   
#  151|-> 		rs->sr_matched = ch_strdup( e->e_dn );
#  152|   		if ( is_entry_referral( e )) {
#  153|   			BerVarray ref = get_entry_referrals( op, e );

Error: CLANG_WARNING: [#def589]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2entry.c:56:5: warning[deadcode.DeadStores]: Value stored to 'rc2' is never read
#   54|   			rc2 = mdb_cursor_open( tid, mdb->mi_id2entry, &mc );
#   55|   			if ( rc2 == MDB_SUCCESS ) {
#   56|-> 				rc2 = mdb_id2entry( op, mc, id, e );
#   57|   				mdb_cursor_close( mc );
#   58|   			}

Error: CPPCHECK_WARNING: [#def590]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2id.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def591]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2id.c: scope_hint: In function ‘mdb_dn2id’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2id.c:315:33: warning[-Wdangling-pointer=]: storing the address of local variable ‘dn’ in ‘matched_134(D)->bv_val’
#  315 |                 *matched->bv_val-- = '\0';
#      |                  ~~~~~~~~~~~~~~~^~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2id.c:306:14: note: ‘dn’ declared here
#  306 |         char dn[SLAP_LDAPDN_MAXLEN];
#      |              ^~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2id.c:296:26: note: ‘matched’ declared here
#  296 |         struct berval   *matched,
#      |         ~~~~~~~~~~~~~~~~~^~~~~~~
#  313|   		matched->bv_val = dn + sizeof(dn) - 1;
#  314|   		matched->bv_len = 0;
#  315|-> 		*matched->bv_val-- = '\0';
#  316|   	}
#  317|   	if ( nmatched ) {

Error: COMPILER_WARNING (CWE-563): [#def592]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2id.c:563:29: warning[-Wunused-but-set-variable]: variable ‘len’ set but not used
#  563 |         int             rc, len, nlen;
#      |                             ^~~
#  561|   	MDB_val		key, data;
#  562|   	MDB_cursor	*cursor;
#  563|-> 	int		rc, len, nlen;
#  564|   	char dn[SLAP_LDAPDN_MAXLEN], ndn[SLAP_LDAPDN_MAXLEN], *ptr;
#  565|   	char *dptr, *nptr;

Error: COMPILER_WARNING (CWE-563): [#def593]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2id.c: scope_hint: In function ‘mdb_id2name’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2id.c:563:34: warning[-Wunused-but-set-variable]: variable ‘nlen’ set but not used
#  563 |         int             rc, len, nlen;
#      |                                  ^~~~
#  561|   	MDB_val		key, data;
#  562|   	MDB_cursor	*cursor;
#  563|-> 	int		rc, len, nlen;
#  564|   	char dn[SLAP_LDAPDN_MAXLEN], ndn[SLAP_LDAPDN_MAXLEN], *ptr;
#  565|   	char *dptr, *nptr;

Error: CLANG_WARNING: [#def594]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2id.c:576:2: warning[deadcode.DeadStores]: Value stored to 'len' is never read
#  574|   	cursor = *cursp;
#  575|   
#  576|-> 	len = 0;
#  577|   	nlen = 0;
#  578|   	dptr = dn;

Error: CLANG_WARNING: [#def595]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2id.c:577:2: warning[deadcode.DeadStores]: Value stored to 'nlen' is never read
#  575|   
#  576|   	len = 0;
#  577|-> 	nlen = 0;
#  578|   	dptr = dn;
#  579|   	nptr = ndn;

Error: CLANG_WARNING: [#def596]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2id.c:604:10: warning[core.UndefinedBinaryOperatorResult]: The left operand of '==' is a garbage value
#  602|   		dptr += rlen;
#  603|   	}
#  604|-> 	if ( rc == 0 ) {
#  605|   		name->bv_len = dptr - dn;
#  606|   		nname->bv_len = nptr - ndn;

Error: CPPCHECK_WARNING (CWE-457): [#def597]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2id.c:609: error[uninitvar]: Uninitialized variable: dn
#  607|   		name->bv_val = op->o_tmpalloc( name->bv_len + 1, op->o_tmpmemctx );
#  608|   		nname->bv_val = op->o_tmpalloc( nname->bv_len + 1, op->o_tmpmemctx );
#  609|-> 		memcpy( name->bv_val, dn, name->bv_len );
#  610|   		name->bv_val[name->bv_len] = '\0';
#  611|   		memcpy( nname->bv_val, ndn, nname->bv_len );

Error: CPPCHECK_WARNING (CWE-457): [#def598]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/dn2id.c:611: error[uninitvar]: Uninitialized variable: ndn
#  609|   		memcpy( name->bv_val, dn, name->bv_len );
#  610|   		name->bv_val[name->bv_len] = '\0';
#  611|-> 		memcpy( nname->bv_val, ndn, nname->bv_len );
#  612|   		nname->bv_val[nname->bv_len] = '\0';
#  613|   	}

Error: CPPCHECK_WARNING: [#def599]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/filterindex.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def600]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/filterindex.c: scope_hint: In function ‘ext_candidates’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/filterindex.c:525:29: warning[-Wunused-but-set-variable]: variable ‘scope’ set but not used
#  525 |                         int scope;
#      |                             ^~~~~
#  523|   			dnRelativeMatch && dnIsSuffix( &mra->ma_value,
#  524|   				op->o_bd->be_nsuffix )) {
#  525|-> 			int scope;
#  526|   			if ( mra->ma_rule == slap_schema.si_mr_dnSuperiorMatch ) {
#  527|   				mdb_dn2sups( op, rtxn, &mra->ma_value, ids );

Error: CLANG_WARNING: [#def601]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/filterindex.c:531:5: warning[deadcode.DeadStores]: Value stored to 'scope' is never read
#  529|   			}
#  530|   			if ( mra->ma_rule == slap_schema.si_mr_dnSubtreeMatch )
#  531|-> 				scope = LDAP_SCOPE_SUBTREE;
#  532|   			else if ( mra->ma_rule == slap_schema.si_mr_dnOneLevelMatch )
#  533|   				scope = LDAP_SCOPE_ONELEVEL;

Error: CLANG_WARNING: [#def602]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/filterindex.c:533:5: warning[deadcode.DeadStores]: Value stored to 'scope' is never read
#  531|   				scope = LDAP_SCOPE_SUBTREE;
#  532|   			else if ( mra->ma_rule == slap_schema.si_mr_dnOneLevelMatch )
#  533|-> 				scope = LDAP_SCOPE_ONELEVEL;
#  534|   			else if ( mra->ma_rule == slap_schema.si_mr_dnSubordinateMatch )
#  535|   				scope = LDAP_SCOPE_SUBORDINATE;

Error: CLANG_WARNING: [#def603]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/filterindex.c:535:5: warning[deadcode.DeadStores]: Value stored to 'scope' is never read
#  533|   				scope = LDAP_SCOPE_ONELEVEL;
#  534|   			else if ( mra->ma_rule == slap_schema.si_mr_dnSubordinateMatch )
#  535|-> 				scope = LDAP_SCOPE_SUBORDINATE;
#  536|   			else
#  537|   				goto base;	/* scope = LDAP_SCOPE_BASE; */

Error: CPPCHECK_WARNING: [#def604]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def605]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c: scope_hint: In function ‘mdb_id2v_compare’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c:50:13: warning[-Wunused-variable]: unused variable ‘rc’
#   50 |         int rc;
#      |             ^~
#   48|   	unsigned short *uv, *cv;
#   49|   	ID ui, ci;
#   50|-> 	int rc;
#   51|   
#   52|   	memcpy(&ui, usrkey->mv_data, sizeof(ID));

Error: COMPILER_WARNING (CWE-563): [#def606]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c:75:13: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
#   75 |         int rc, match, olen;
#      |             ^~
#   73|   	AttributeDescription *ad = usrkey[2].mv_data;
#   74|   	struct berval bv1, bv2;
#   75|-> 	int rc, match, olen;
#   76|   	unsigned short s;
#   77|   	char *ptr;

Error: COMPILER_WARNING (CWE-563): [#def607]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c: scope_hint: In function ‘mdb_id2v_dupsort’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c:75:24: warning[-Wunused-variable]: unused variable ‘olen’
#   75 |         int rc, match, olen;
#      |                        ^~~~
#   73|   	AttributeDescription *ad = usrkey[2].mv_data;
#   74|   	struct berval bv1, bv2;
#   75|-> 	int rc, match, olen;
#   76|   	unsigned short s;
#   77|   	char *ptr;

Error: CLANG_WARNING: [#def608]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c:91:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#   89|   	if (ad && ad->ad_type->sat_equality) {
#   90|   		MatchingRule *mr = ad->ad_type->sat_equality;
#   91|-> 		rc = mr->smr_match(&match, SLAP_MR_EQUALITY
#   92|   		| SLAP_MR_VALUE_OF_ASSERTION_SYNTAX
#   93|   		| SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH

Error: COMPILER_WARNING (CWE-563): [#def609]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c: scope_hint: In function ‘mdb_mval_del’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c:166:15: warning[-Wunused-variable]: unused variable ‘ptr’
#  166 |         char *ptr;
#      |               ^~~
#  164|   	struct mdb_info *mdb = (struct mdb_info *) op->o_bd->be_private;
#  165|   	MDB_val key, data[3];
#  166|-> 	char *ptr;
#  167|   	char ivk[ID2VKSZ];
#  168|   	unsigned i;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def610]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c: scope_hint: In function ‘mdb_opinfo_get’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c:754:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘moi’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c:17: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:57: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/back-mdb.h:21: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c:23: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c:721:17: note: in expansion of macro ‘LDAP_SLIST_FOREACH’
#  752|   			*moip = moi;
#  753|   		}
#  754|-> 		moi->moi_ref++;
#  755|   		if ( !moi->moi_txn ) {
#  756|   			if (( slapMode & SLAP_TOOL_MODE ) && mdb_tool_txn ) {

Error: CLANG_WARNING: [#def611]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c:1059:9: warning[core.NullDereference]: Access to field 'a_vals' results in a dereference of a null pointer (loaded from variable 'a')
# 1057|   	}
# 1058|   	a = x->e_attrs;
# 1059|-> 	bptr = a->a_vals;
# 1060|   	i = *lp++;
# 1061|   	ptr = (unsigned char *)(lp + i);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def612]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c: scope_hint: In function ‘mdb_entry_decode’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/id2entry.c:1059:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘a’
# 1057|   	}
# 1058|   	a = x->e_attrs;
# 1059|-> 	bptr = a->a_vals;
# 1060|   	i = *lp++;
# 1061|   	ptr = (unsigned char *)(lp + i);

Error: CPPCHECK_WARNING: [#def613]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/idl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-1164): [#def614]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/idl.c:206:12: warning[-Wunused-function]: ‘mdb_idl_delete’ defined but not used
#  206 | static int mdb_idl_delete( ID *ids, ID id )
#      |            ^~~~~~~~~~~~~~
#  204|   }
#  205|   
#  206|-> static int mdb_idl_delete( ID *ids, ID id )
#  207|   {
#  208|   	unsigned x;

Error: CLANG_WARNING: [#def615]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/idl.c:673:6: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  671|   				} else {
#  672|   					/* position on lo */
#  673|-> 					rc = mdb_cursor_get( cursor, &key, &data, MDB_NEXT_DUP );
#  674|   					if ( id == lo )
#  675|   						data.mv_data = &lo2;

Error: CLANG_WARNING: [#def616]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/idl.c:678:7: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  676|   					else {
#  677|   						/* position on hi */
#  678|-> 						rc = mdb_cursor_get( cursor, &key, &data, MDB_NEXT_DUP );
#  679|   						data.mv_data = &hi2;
#  680|   					}

Error: CPPCHECK_WARNING: [#def617]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def618]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c: scope_hint: In function ‘mdb_index_param’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c:84:27: warning[-Wunused-but-set-variable]: variable ‘type’ set but not used
#   84 |         slap_mask_t mask, type = 0;
#      |                           ^~~~
#   82|   {
#   83|   	AttrInfo *ai;
#   84|-> 	slap_mask_t mask, type = 0;
#   85|   
#   86|   	ai = mdb_index_mask( be, desc, prefixp );

Error: CLANG_WARNING: [#def619]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c:115:3: warning[deadcode.DeadStores]: Value stored to 'type' is never read
#  113|   	switch( ftype ) {
#  114|   	case LDAP_FILTER_PRESENT:
#  115|-> 		type = SLAP_INDEX_PRESENT;
#  116|   		if( IS_SLAP_INDEX( mask, SLAP_INDEX_PRESENT ) ) {
#  117|   			*prefixp = presence_key[0];

Error: CLANG_WARNING: [#def620]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c:123:3: warning[deadcode.DeadStores]: Value stored to 'type' is never read
#  121|   
#  122|   	case LDAP_FILTER_APPROX:
#  123|-> 		type = SLAP_INDEX_APPROX;
#  124|   		if ( desc->ad_type->sat_approx ) {
#  125|   			if( IS_SLAP_INDEX( mask, SLAP_INDEX_APPROX ) ) {

Error: CLANG_WARNING: [#def621]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c:135:3: warning[deadcode.DeadStores]: Value stored to 'type' is never read
#  133|   
#  134|   	case LDAP_FILTER_EQUALITY:
#  135|-> 		type = SLAP_INDEX_EQUALITY;
#  136|   		if( IS_SLAP_INDEX( mask, SLAP_INDEX_EQUALITY ) ) {
#  137|   			goto done;

Error: CLANG_WARNING: [#def622]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c:142:3: warning[deadcode.DeadStores]: Value stored to 'type' is never read
#  140|   
#  141|   	case LDAP_FILTER_SUBSTRINGS:
#  142|-> 		type = SLAP_INDEX_SUBSTR;
#  143|   		if( IS_SLAP_INDEX( mask, SLAP_INDEX_SUBSTR ) ) {
#  144|   			goto done;

Error: COMPILER_WARNING (CWE-563): [#def623]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c: scope_hint: In function ‘indexer’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c:179:15: warning[-Wunused-but-set-variable]: variable ‘err’ set but not used
#  179 |         char *err;
#      |               ^~~
#  177|   	MDB_cursor *mc = ai->ai_cursor;
#  178|   	mdb_idl_keyfunc *keyfunc;
#  179|-> 	char *err;
#  180|   
#  181|   	assert( mask != 0 );

Error: CLANG_WARNING: [#def624]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c:184:3: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  182|   
#  183|   	if ( !mc ) {
#  184|-> 		err = "c_open";
#  185|   		rc = mdb_cursor_open( txn, ai->ai_dbi, &mc );
#  186|   		if ( rc ) goto done;

Error: CLANG_WARNING: [#def625]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c:207:4: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  205|   		rc = keyfunc( op->o_bd, mc, presence_key, id );
#  206|   		if( rc ) {
#  207|-> 			err = "presence";
#  208|   			goto done;
#  209|   		}

Error: CLANG_WARNING: [#def626]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c:224:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  222|   			ber_bvarray_free_x( keys, op->o_tmpmemctx );
#  223|   			if ( rc ) {
#  224|-> 				err = "equality";
#  225|   				goto done;
#  226|   			}

Error: CLANG_WARNING: [#def627]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c:243:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  241|   			ber_bvarray_free_x( keys, op->o_tmpmemctx );
#  242|   			if ( rc ) {
#  243|-> 				err = "approx";
#  244|   				goto done;
#  245|   			}

Error: CLANG_WARNING: [#def628]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/index.c:263:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read
#  261|   			ber_bvarray_free_x( keys, op->o_tmpmemctx );
#  262|   			if( rc ) {
#  263|-> 				err = "substr";
#  264|   				goto done;
#  265|   			}

Error: CPPCHECK_WARNING: [#def629]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/init.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def630]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/init.c:244:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  242|   			mdb_set_dupsort( txn, mdb->mi_dbis[i], mdb_dup_compare );
#  243|   			/* check for old dn2id format */
#  244|-> 			rc = mdb_cursor_open( txn, mdb->mi_dbis[i], &mc );
#  245|   			/* first record is always ID 0 */
#  246|   			rc = mdb_cursor_get( mc, &key, &data, MDB_FIRST );

Error: CLANG_WARNING: [#def631]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/init.c:293:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  291|   	if ( slapMode & SLAP_SERVER_MODE ) {
#  292|   		MDB_stat st;
#  293|-> 		rc = mdb_stat( txn, mdb->mi_idxckp, &st );
#  294|   		if ( st.ms_entries )
#  295|   			do_index = mdb_resume_index( be, txn );

Error: CLANG_WARNING: [#def632]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/modify.c:469:10: warning[deadcode.DeadStores]: Value stored to 'k2' during its initialization is never read
#  467|   					char found = 0;
#  468|   					BerValue* current = &ap->a_nvals[i];
#  469|-> 					int k2 = k;
#  470|   					for (k2 = k ; k2 < a2->a_numvals; k2 ++) {
#  471|   						int match = -1, rc;

Error: CLANG_WARNING: [#def633]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/modify.c:671:23: warning[core.NullDereference]: Access to field 'e_ocflags' results in a dereference of a null pointer (loaded from variable 'e')
#  669|   	}
#  670|   
#  671|-> 	if ( !manageDSAit && is_entry_referral( e ) ) {
#  672|   		/* entry is a referral, don't allow modify */
#  673|   		rs->sr_ref = get_entry_referrals( op, e );

Error: COMPILER_WARNING (CWE-563): [#def634]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/modrdn.c: scope_hint: In function ‘mdb_modrdn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/modrdn.c:44:26: warning[-Wunused-but-set-variable]: variable ‘new_parent_dn’ set but not used
#   44 |         struct berval   *new_parent_dn = NULL;  /* np_dn, p_dn, or NULL */
#      |                          ^~~~~~~~~~~~~
#   42|   	struct berval	*np_dn = NULL;			/* newSuperior dn */
#   43|   	struct berval	*np_ndn = NULL;			/* newSuperior ndn */
#   44|-> 	struct berval	*new_parent_dn = NULL;	/* np_dn, p_dn, or NULL */
#   45|   
#   46|   	int		manageDSAit = get_manageDSAit( op );

Error: CLANG_WARNING: [#def635]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/modrdn.c:91:2: warning[deadcode.DeadStores]: Value stored to 'np_ndn' is never read
#   89|   		dnParent( &op->o_req_ndn, &p_ndn );
#   90|   	}
#   91|-> 	np_ndn = &p_ndn;
#   92|   	/* Make sure parent entry exist and we can write its
#   93|   	 * children.

Error: CLANG_WARNING: [#def636]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/modrdn.c:223:22: warning[core.NullDereference]: Access to field 'e_ocflags' results in a dereference of a null pointer (loaded from variable 'e')
#  221|   	}
#  222|   
#  223|-> 	if (!manageDSAit && is_entry_referral( e ) ) {
#  224|   		/* entry is a referral, don't allow rename */
#  225|   		rs->sr_ref = get_entry_referrals( op, e );

Error: CLANG_WARNING: [#def637]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/modrdn.c:240:2: warning[deadcode.DeadStores]: Value stored to 'new_parent_dn' is never read
#  238|   	}
#  239|   
#  240|-> 	new_parent_dn = &p_dn;	/* New Parent unless newSuperior given */
#  241|   
#  242|   	if ( op->oq_modrdn.rs_newSup != NULL ) {

Error: CLANG_WARNING: [#def638]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/modrdn.c:268:4: warning[deadcode.DeadStores]: Value stored to 'np_dn' is never read
#  266|   	if ( op->oq_modrdn.rs_newSup != NULL ) {
#  267|   		if ( op->oq_modrdn.rs_newSup->bv_len ) {
#  268|-> 			np_dn = op->oq_modrdn.rs_newSup;
#  269|   			np_ndn = op->oq_modrdn.rs_nnewSup;
#  270|   

Error: CLANG_WARNING: [#def639]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/modrdn.c:369:3: warning[deadcode.DeadStores]: Value stored to 'new_parent_dn' is never read
#  367|   			": wr to new parent's children OK\n" );
#  368|   
#  369|-> 		new_parent_dn = np_dn;
#  370|   	}
#  371|   

Error: CPPCHECK_WARNING: [#def640]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/monitor.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def641]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/monitor.c:227:13: warning[deadcode.DeadStores]: Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc'
#  225|   		rc = mdb_cursor_open( txn, 0, &cursor );
#  226|   		if ( !rc ) {
#  227|-> 			while (( rc = mdb_cursor_get( cursor, &key, &data, MDB_NEXT )) == 0 ) {
#  228|   				iptr = data.mv_data;
#  229|   				pages += *iptr;

Error: COMPILER_WARNING (CWE-563): [#def642]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/monitor.c: scope_hint: In function ‘mdb_monitor_free’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/monitor.c:275:28: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
#  275 |         int             i, rc;
#      |                            ^~
#  273|   	char		textbuf[ SLAP_TEXT_BUFLEN ];
#  274|   
#  275|-> 	int		i, rc;
#  276|   
#  277|   	/* NOTE: if slap_shutdown != 0, priv might have already been freed */

Error: CLANG_WARNING: [#def643]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/monitor.c:288:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  286|   	BER_BVZERO( &values[ 1 ] );
#  287|   
#  288|-> 	rc = modify_delete_values( e, &mod, 1, &text,
#  289|   		textbuf, sizeof( textbuf ) );
#  290|   	/* don't care too much about return code... */

Error: CLANG_WARNING: [#def644]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/monitor.c:297:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  295|   	for ( i = 0; s_at[ i ].desc != NULL; i++ ) {
#  296|   		mod.sm_desc = *s_at[ i ].ad;
#  297|-> 		rc = modify_delete_values( e, &mod, 1, &text,
#  298|   			textbuf, sizeof( textbuf ) );
#  299|   		/* don't care too much about return code... */

Error: COMPILER_WARNING (CWE-252): [#def645]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/monitor.c: scope_hint: In function ‘mdb_monitor_db_open’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/monitor.c:487:25: warning[-Wunused-result]: ignoring return value of ‘getcwd’ declared with attribute ‘warn_unused_result’
#  487 |                         getcwd( path, sizeof( path ) );
#      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  485|   		if ( fname[ 0 ] != '/' ) {
#  486|   			/* get full path name */
#  487|-> 			getcwd( path, sizeof( path ) );
#  488|   			pathlen = strlen( path );
#  489|   

Error: CLANG_WARNING: [#def646]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/monitor.c:525:3: warning[deadcode.DeadStores]: Value stored to 'next' is never read
#  523|   		}
#  524|   
#  525|-> 		next = next->a_next;
#  526|   	}
#  527|   

Error: CLANG_WARNING: [#def647]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/operational.c:115:4: warning[deadcode.DeadStores]: Value stored to 'ap' is never read
#  113|   			assert( *ap != NULL );
#  114|   
#  115|-> 			ap = &(*ap)->a_next;
#  116|   		}
#  117|   	}

Error: CPPCHECK_WARNING: [#def648]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/search.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def649]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/search.c:177:2: warning[deadcode.DeadStores]: Value stored to 'ido' is never read
#  175|   
#  176|   	cursoro = 0;
#  177|-> 	ido = mdb_idl_first( oldsubs, &cursoro );
#  178|   
#  179|   	for (;;) {

Error: COMPILER_WARNING (CWE-563): [#def650]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/search.c: scope_hint: In function ‘mdb_search’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/search.c:430:26: warning[-Wunused-but-set-variable]: variable ‘attrs’ set but not used
#  430 |         AttributeName   *attrs;
#      |                          ^~~~~
#  428|   	Entry		*e = NULL, *base = NULL;
#  429|   	Entry		*matched = NULL;
#  430|-> 	AttributeName	*attrs;
#  431|   	slap_mask_t	mask;
#  432|   	time_t		stoptime;

Error: CLANG_WARNING: [#def651]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/search.c:445:2: warning[deadcode.DeadStores]: Value stored to 'attrs' is never read
#  443|   
#  444|   	Debug( LDAP_DEBUG_TRACE, "=> " LDAP_XSTRING(mdb_search) "\n" );
#  445|-> 	attrs = op->oq_search.rs_attrs;
#  446|   
#  447|   	manageDSAit = get_manageDSAit( op );

Error: COMPILER_WARNING (CWE-457): [#def652]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/search.c:1180:51: warning[-Wmaybe-uninitialized]: ‘cscope’ may be used uninitialized
# 1180 |                                 while (iscopes[0] && cscope < iscopes[0]) {
#      |                                        ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/search.c:423:51: note: ‘cscope’ was declared here
#  423 |         ID              id, cursor, nsubs, ncand, cscope;
#      |                                                   ^~~~~~
# 1178|   				 * alias scopes left, search them too.
# 1179|   				 */
# 1180|-> 				while (iscopes[0] && cscope < iscopes[0]) {
# 1181|   					cscope++;
# 1182|   					isc.id = iscopes[cscope];

Error: CPPCHECK_WARNING: [#def653]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/tools.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def654]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/tools.c:231:28: warning[core.NullDereference]: Access to field 'mi_dbenv' results in a dereference of a null pointer (loaded from variable 'mdb')
#  229|   		struct mdb_info *mdb = be->be_private;
#  230|   		if ( !txi ) {
#  231|-> 			int rc = mdb_txn_begin( mdb->mi_dbenv, NULL, 0, &txi );
#  232|   			if( rc != 0 ) {
#  233|   				Debug( LDAP_DEBUG_ANY,

Error: CLANG_WARNING: [#def655]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/tools.c:240:18: warning[core.NullDereference]: Array access (via field 'mi_dbis') results in a null pointer dereference
#  238|   			}
#  239|   		}
#  240|-> 		mdb_drop( txi, mdb->mi_idxckp, 0 );
#  241|   	}
#  242|   	if( txi ) {

Error: COMPILER_WARNING (CWE-1164): [#def656]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/tools.c:1253:1: warning[-Wunused-function]: ‘mdb_tool_index_task’ defined but not used
# 1253 | mdb_tool_index_task( void *ctx, void *ptr )
#      | ^~~~~~~~~~~~~~~~~~~
# 1251|   
# 1252|   static void *
# 1253|-> mdb_tool_index_task( void *ctx, void *ptr )
# 1254|   {
# 1255|   	int base = *(int *)ptr;

Error: CLANG_WARNING: [#def657]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/tools.c:1628:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1626|   		}
# 1627|   		if (dkids > 1) {
# 1628|-> 			rc = mdb_cursor_get(mc, &key, &data, MDB_NEXT_DUP);
# 1629|   down:
# 1630|   			ptr = (unsigned char *)data.mv_data + data.mv_size - sizeof(ID);

Error: COMPILER_WARNING: [#def658]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def659]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-mdb/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_mdb 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: GCC_ANALYZER_WARNING (CWE-476): [#def660]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:36: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/back-meta.h:281:57: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/back-meta.h:282:49: note: in expansion of macro ‘META_BACK_CMN_ISSET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2595:22: note: in expansion of macro ‘META_BACK_CMN_QUARANTINE’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/back-meta.h:282:49: note: in expansion of macro ‘META_BACK_CMN_ISSET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2595:22: note: in expansion of macro ‘META_BACK_CMN_QUARANTINE’
#  279|   
#  280|   	unsigned		mc_flags;
#  281|-> #define	META_BACK_CMN_ISSET(mc,f)		( ( (mc)->mc_flags & (f) ) == (f) )
#  282|   #define	META_BACK_CMN_QUARANTINE(mc)		META_BACK_CMN_ISSET( (mc), LDAP_BACK_F_QUARANTINE )
#  283|   #define	META_BACK_CMN_CHASE_REFERRALS(mc)	META_BACK_CMN_ISSET( (mc), LDAP_BACK_F_CHASE_REFERRALS )

Error: CPPCHECK_WARNING: [#def661]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/bind.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def662]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/candidates.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def663]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/candidates.c:58:17: warning[deadcode.DeadStores]: Value stored to 'ms' during its initialization is never read
#   56|   meta_subtree_match( metatarget_t *mt, struct berval *ndn, int scope )
#   57|   {
#   58|-> 	metasubtree_t *ms = mt->mt_subtree;
#   59|   
#   60|   	for ( ms = mt->mt_subtree; ms; ms = ms->ms_next ) {

Error: CLANG_WARNING: [#def664]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/compare.c:71:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#   69|   	switch ( ldap_back_dn_massage( &dc, &op->o_req_dn, &mdn ) ) {
#   70|   	case LDAP_UNWILLING_TO_PERFORM:
#   71|-> 		rc = 1;
#   72|   		goto cleanup;
#   73|   

Error: CLANG_WARNING: [#def665]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/compare.c:108:5: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  106|   			{
#  107|   			case LDAP_UNWILLING_TO_PERFORM:
#  108|-> 				rc = 1;
#  109|   				goto cleanup;
#  110|   

Error: CPPCHECK_WARNING: [#def666]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def667]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:110:32: warning[-Wmissing-braces]: missing braces around initializer
#  110 | static ConfigTable metacfg[] = {
#      |                                ^
#  108|   };
#  109|   
#  110|-> static ConfigTable metacfg[] = {
#  111|   	{ "uri", "uri", 2, 0, 0,
#  112|   		ARG_MAGIC|LDAP_BACK_CFG_URI,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def668]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c: scope_hint: In function ‘meta_subtree_unparse’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:733:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:23: included_from: Included from here.
#  731|   	struct berval bv, *style;
#  732|   
#  733|-> 	if ( !mt->mt_subtree )
#  734|   		return 1;
#  735|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def669]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c: scope_hint: In function ‘meta_subtree_config’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:770:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
#  768|   
#  769|   	if ( c->type == LDAP_BACK_CFG_SUBTREE_EX ) {
#  770|-> 		if ( mt->mt_subtree && !mt->mt_subtree_exclude ) {
#  771|   			snprintf( c->cr_msg, sizeof(c->cr_msg),
#  772|   				"\"subtree-exclude\" incompatible with previous \"subtree-include\" directives" );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def670]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:779:24: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
#  777|   
#  778|   	} else {
#  779|-> 		if ( mt->mt_subtree && mt->mt_subtree_exclude ) {
#  780|   			snprintf( c->cr_msg, sizeof(c->cr_msg),
#  781|   				"\"subtree-include\" incompatible with previous \"subtree-exclude\" directives" );

Error: COMPILER_WARNING: [#def671]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c: scope_hint: In function ‘meta_subtree_config’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:870:75: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
#  870 |                                 "regular expression \"%s\" bad because of %s",
#      |                                                                           ^~
#  871 |                                 pattern, regerr );
#      |                                          ~~~~~~                            
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  868|   
#  869|   			snprintf( c->cr_msg, sizeof( c->cr_msg ),
#  870|-> 				"regular expression \"%s\" bad because of %s",
#  871|   				pattern, regerr );
#  872|   			ch_free( ms );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def672]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c: scope_hint: In function ‘meta_back_cf_gen’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:1364:51: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1362|   		/* target attrs */
# 1363|   		case LDAP_BACK_CFG_URI: {
# 1364|-> 			char *p2, *p1 = strchr( mt->mt_uri, ' ' );
# 1365|   			bv.bv_len = strlen( mt->mt_uri ) + 3 + mt->mt_psuffix.bv_len;
# 1366|   			bv.bv_val = ch_malloc( bv.bv_len + 1 );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def673]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:1390:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1388|   
# 1389|   			bvp = &mt->mt_idassert_authz;
# 1390|-> 			if ( *bvp == NULL ) {
# 1391|   				if ( mt->mt_idassert_flags & LDAP_BACK_AUTH_AUTHZ_ALL )
# 1392|   				{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def674]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:1586:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1584|   
# 1585|   		case LDAP_BACK_CFG_FILTER:
# 1586|-> 			if ( mt->mt_filter == NULL ) {
# 1587|   				rc = 1;
# 1588|   			} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def675]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:1738:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1736|   		/* target attrs */
# 1737|   		case LDAP_BACK_CFG_URI:
# 1738|-> 			if ( mt->mt_uri ) {
# 1739|   				ch_free( mt->mt_uri );
# 1740|   				mt->mt_uri = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def676]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:1752:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1750|   			bvp = &mt->mt_idassert_authz;
# 1751|   			if ( c->valx < 0 ) {
# 1752|-> 				if ( *bvp != NULL ) {
# 1753|   					ber_bvarray_free( *bvp );
# 1754|   					*bvp = NULL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def677]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:1758:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1756|   
# 1757|   			} else {
# 1758|-> 				if ( *bvp == NULL ) {
# 1759|   					rc = 1;
# 1760|   					break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def678]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:1857:73: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1855|   		case LDAP_BACK_CFG_SUBTREE_IN:
# 1856|   			/* can only be one of exclude or include */
# 1857|-> 			if (( c->type == LDAP_BACK_CFG_SUBTREE_EX ) ^ mt->mt_subtree_exclude ) {
# 1858|   				rc = 1;
# 1859|   				break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def679]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:1882:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1880|   		case LDAP_BACK_CFG_FILTER:
# 1881|   			if ( c->valx < 0 ) {
# 1882|-> 				meta_filter_destroy( mt->mt_filter );
# 1883|   				mt->mt_filter = NULL;
# 1884|   			} else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def680]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:1886:70: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mt’
# 1884|   			} else {
# 1885|   				metafilter_t *mf, **mprev;
# 1886|-> 				for (i=0, mprev = &mt->mt_filter, mf = *mprev; mf; mf = *mprev) {
# 1887|   					if ( i == c->valx ) {
# 1888|   						*mprev = mf->mf_next;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def681]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2157:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘mt’
# 2155|   	case LDAP_BACK_CFG_SUBTREE_IN:
# 2156|   	/* subtree-exclude */
# 2157|-> 		if ( meta_subtree_config( mt, c )) {
# 2158|   			Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->cr_msg );
# 2159|   			return 1;

Error: COMPILER_WARNING: [#def682]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c: scope_hint: In function ‘meta_back_cf_gen’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2171:75: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 255 bytes into a region of size 219
# 2171 |                                 "regular expression \"%s\" bad because of %s",
#      |                                                                           ^~
# 2172 |                                 c->argv[1], regerr );
#      |                                             ~~~~~~                         
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 38 or more bytes (assuming 293) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
# 2169|   			regerror( rc, &mf->mf_regex, regerr, sizeof(regerr) );
# 2170|   			snprintf( c->cr_msg, sizeof( c->cr_msg ),
# 2171|-> 				"regular expression \"%s\" bad because of %s",
# 2172|   				c->argv[1], regerr );
# 2173|   			ch_free( mf );

Error: COMPILER_WARNING (CWE-457): [#def683]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c: scope_hint: In function ‘meta_back_cf_gen’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2177:26: warning[-Wmaybe-uninitialized]: ‘mt’ may be used uninitialized
# 2177 |                 for ( m2 = &mt->mt_filter; *m2; m2 = &(*m2)->mf_next )
#      |                       ~~~^~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:1092:26: note: ‘mt’ was declared here
# 1092 |         metatarget_t    *mt;
#      |                          ^~
# 2175|   		}
# 2176|   		ber_str2bv( c->argv[1], 0, 1, &mf->mf_regex_pattern );
# 2177|-> 		for ( m2 = &mt->mt_filter; *m2; m2 = &(*m2)->mf_next )
# 2178|   			;
# 2179|   		*m2 = mf;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def684]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2255:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2253|   			return 1;
# 2254|   		}
# 2255|-> 		mc->mc_network_timeout = (time_t)t;
# 2256|   		} break;
# 2257|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def685]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2297:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2295|   	/* save bind creds for referral rebinds? */
# 2296|   		if ( c->argc == 1 || c->value_int ) {
# 2297|-> 			mc->mc_flags |= LDAP_BACK_F_SAVECRED;
# 2298|   		} else {
# 2299|   			mc->mc_flags &= ~LDAP_BACK_F_SAVECRED;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def686]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2299:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2297|   			mc->mc_flags |= LDAP_BACK_F_SAVECRED;
# 2298|   		} else {
# 2299|-> 			mc->mc_flags &= ~LDAP_BACK_F_SAVECRED;
# 2300|   		}
# 2301|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def687]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2305:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2303|   	case LDAP_BACK_CFG_CHASE:
# 2304|   		if ( c->argc == 1 || c->value_int ) {
# 2305|-> 			mc->mc_flags |= LDAP_BACK_F_CHASE_REFERRALS;
# 2306|   		} else {
# 2307|   			mc->mc_flags &= ~LDAP_BACK_F_CHASE_REFERRALS;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def688]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2307:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2305|   			mc->mc_flags |= LDAP_BACK_F_CHASE_REFERRALS;
# 2306|   		} else {
# 2307|-> 			mc->mc_flags &= ~LDAP_BACK_F_CHASE_REFERRALS;
# 2308|   		}
# 2309|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def689]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2320:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2318|   			return 1;
# 2319|   		}
# 2320|-> 		mc->mc_flags &= ~LDAP_BACK_F_TLS_MASK;
# 2321|   		mc->mc_flags |= tls_mode[i].mask;
# 2322|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def690]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2348:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2346|   			return 1;
# 2347|   		}
# 2348|-> 		mc->mc_flags &= ~LDAP_BACK_F_T_F_MASK2;
# 2349|   		mc->mc_flags |= t_f_mode[i].mask;
# 2350|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def691]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2443:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2441|   			return 1;
# 2442|   		}
# 2443|-> 		mc->mc_flags &= ~LDAP_BACK_F_CANCEL_MASK2;
# 2444|   		mc->mc_flags |= cancel_mode[i].mask;
# 2445|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def692]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2623:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2621|   	/* session tracking request */
# 2622|   		if ( c->value_int ) {
# 2623|-> 			mc->mc_flags |= LDAP_BACK_F_ST_REQUEST;
# 2624|   		} else {
# 2625|   			mc->mc_flags &= ~LDAP_BACK_F_ST_REQUEST;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def693]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2625:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2623|   			mc->mc_flags |= LDAP_BACK_F_ST_REQUEST;
# 2624|   		} else {
# 2625|-> 			mc->mc_flags &= ~LDAP_BACK_F_ST_REQUEST;
# 2626|   		}
# 2627|   		break;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def694]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2638:34: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘mt’
# 2636|   		int cnt = 0, argc, ix = c->valx;
# 2637|   
# 2638|-> 		if ( mt->mt_rwmap.rwm_bva_rewrite ) {
# 2639|   			for ( ; !BER_BVISNULL( &mt->mt_rwmap.rwm_bva_rewrite[ cnt ] ); cnt++ )
# 2640|   				/* count */ ;

Error: COMPILER_WARNING (CWE-457): [#def695]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2692:35: warning[-Wmaybe-uninitialized]: ‘i’ may be used uninitialized
# 2692 |                         for ( ; i < cnt; i++ ) {
#      |                                 ~~^~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:1095:13: note: ‘i’ was declared here
# 1095 |         int i, rc = 0;
#      |             ^
# 2690|   		}
# 2691|   		if ( ix < cnt ) {
# 2692|-> 			for ( ; i < cnt; i++ ) {
# 2693|   				ca.line = mt->mt_rwmap.rwm_bva_rewrite[ i ].bv_val;
# 2694|   				ca.argc = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def696]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2871:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2869|   		}
# 2870|   
# 2871|-> 		mc->mc_nretries = nretries;
# 2872|   		} break;
# 2873|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def697]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2882:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2880|   			return 1;
# 2881|   		}
# 2882|-> 		mc->mc_version = c->value_int;
# 2883|   		break;
# 2884|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def698]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2888:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2886|   	/* do not return search references */
# 2887|   		if ( c->value_int ) {
# 2888|-> 			mc->mc_flags |= LDAP_BACK_F_NOREFS;
# 2889|   		} else {
# 2890|   			mc->mc_flags &= ~LDAP_BACK_F_NOREFS;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def699]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2890:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2888|   			mc->mc_flags |= LDAP_BACK_F_NOREFS;
# 2889|   		} else {
# 2890|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOREFS;
# 2891|   		}
# 2892|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def700]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2897:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2895|   	/* do not propagate undefined search filters */
# 2896|   		if ( c->value_int ) {
# 2897|-> 			mc->mc_flags |= LDAP_BACK_F_NOUNDEFFILTER;
# 2898|   		} else {
# 2899|   			mc->mc_flags &= ~LDAP_BACK_F_NOUNDEFFILTER;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def701]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2899:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2897|   			mc->mc_flags |= LDAP_BACK_F_NOUNDEFFILTER;
# 2898|   		} else {
# 2899|-> 			mc->mc_flags &= ~LDAP_BACK_F_NOUNDEFFILTER;
# 2900|   		}
# 2901|   		break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def702]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2906:35: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2904|   	case LDAP_BACK_CFG_CLIENT_PR:
# 2905|   		if ( strcasecmp( c->argv[ 1 ], "accept-unsolicited" ) == 0 ) {
# 2906|-> 			mc->mc_ps = META_CLIENT_PR_ACCEPT_UNSOLICITED;
# 2907|   
# 2908|   		} else if ( strcasecmp( c->argv[ 1 ], "disable" ) == 0 ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def703]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2909:35: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
# 2907|   
# 2908|   		} else if ( strcasecmp( c->argv[ 1 ], "disable" ) == 0 ) {
# 2909|-> 			mc->mc_ps = META_CLIENT_PR_DISABLE;
# 2910|   
# 2911|   		} else if ( lutil_atoi( &mc->mc_ps, c->argv[ 1 ] ) || mc->mc_ps < -1 ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def704]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:2911:73: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:59: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/config.c:31: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lutil.h:318:46: note: in definition of macro ‘lutil_atoi’
# 2909|   			mc->mc_ps = META_CLIENT_PR_DISABLE;
# 2910|   
# 2911|-> 		} else if ( lutil_atoi( &mc->mc_ps, c->argv[ 1 ] ) || mc->mc_ps < -1 ) {
# 2912|   			snprintf( c->cr_msg, sizeof( c->cr_msg ),
# 2913|   				"unable to parse client-pr {accept-unsolicited|disable|<size>}: \"%s\"",

Error: CPPCHECK_WARNING: [#def705]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def706]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c: scope_hint: In function ‘meta_back_init_one_conn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:280:60: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘mc’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:34: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1052:17: note: in expansion of macro ‘LDAP_BACK_PCONN_ROOTDN_SET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:57: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:33: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_queue.h:394:34: note: in definition of macro ‘LDAP_TAILQ_FIRST’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1086:25: note: in expansion of macro ‘LDAP_TAILQ_FOREACH’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1087:52: note: in expansion of macro ‘LDAP_BACK_CONN2PRIV’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:340:46: note: in definition of macro ‘LDAP_BACK_ISSET_F’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/back-meta.h:449:33: note: in expansion of macro ‘mi_flags’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:343:66: note: in expansion of macro ‘li_flags’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:362:41: note: in expansion of macro ‘LDAP_BACK_ISSET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1107:38: note: in expansion of macro ‘LDAP_BACK_USE_TEMPORARIES’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:23: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:35: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1477:47: note: in expansion of macro ‘mc_conn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:123:41: note: in expansion of macro ‘LDAP_BACK_CONN_ISSET_F’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-ldap/back-ldap.h:145:49: note: in expansion of macro ‘LDAP_BACK_CONN_ISSET’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1483:37: note: in expansion of macro ‘LDAP_BACK_CONN_ISANON’
#  278|   	int			version;
#  279|   	dncookie		dc;
#  280|-> 	int			isauthz = ( candidate == mc->mc_authz_target );
#  281|   	int			do_return = 0;
#  282|   #ifdef HAVE_TLS

Error: COMPILER_WARNING (CWE-563): [#def707]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c: scope_hint: In function ‘meta_back_get_candidate’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:919:33: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
#  919 |                 int             rc;
#      |                                 ^~
#  917|   		SlapReply	rs2 = { REP_RESULT };
#  918|   		slap_callback	cb2 = { 0 };
#  919|-> 		int		rc;
#  920|   
#  921|   		/* try to get a unique match for the request ndn

Error: CLANG_WARNING: [#def708]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:941:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  939|   		cb2.sc_private = (void *)&candidate;
#  940|   
#  941|-> 		rc = op->o_bd->be_search( &op2, &rs2 );
#  942|   
#  943|   		switch ( rs2.sr_err ) {

Error: CLANG_WARNING: [#def709]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1278:5: warning[deadcode.DeadStores]: Value stored to 'err' is never read
# 1276|   				 */
# 1277|   				META_CANDIDATE_RESET( &candidates[ i ] );
# 1278|-> 				err = candidates[ i ].sr_err;
# 1279|   				continue;
# 1280|   			}

Error: COMPILER_WARNING (CWE-563): [#def710]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1317:42: warning[-Wunused-but-set-variable]: variable ‘mt’ set but not used
# 1317 |                 metatarget_t            *mt = NULL;
#      |                                          ^~
# 1315|   
# 1316|   	if ( op_type == META_OP_REQUIRE_SINGLE ) {
# 1317|-> 		metatarget_t		*mt = NULL;
# 1318|   		metasingleconn_t	*msc = NULL;
# 1319|   

Error: COMPILER_WARNING (CWE-563): [#def711]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c: scope_hint: In function ‘meta_back_getconn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1318:42: warning[-Wunused-but-set-variable]: variable ‘msc’ set but not used
# 1318 |                 metasingleconn_t        *msc = NULL;
#      |                                          ^~~
# 1316|   	if ( op_type == META_OP_REQUIRE_SINGLE ) {
# 1317|   		metatarget_t		*mt = NULL;
# 1318|-> 		metasingleconn_t	*msc = NULL;
# 1319|   
# 1320|   		int			j;

Error: CLANG_WARNING: [#def712]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1429:3: warning[deadcode.DeadStores]: Value stored to 'mt' is never read
# 1427|   		( void )meta_clear_unused_candidates( op, i, candidates );
# 1428|   
# 1429|-> 		mt = mi->mi_targets[ i ];
# 1430|   		msc = &mc->mc_conns[ i ];
# 1431|   

Error: CLANG_WARNING: [#def713]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1430:3: warning[deadcode.DeadStores]: Value stored to 'msc' is never read
# 1428|   
# 1429|   		mt = mi->mi_targets[ i ];
# 1430|-> 		msc = &mc->mc_conns[ i ];
# 1431|   
# 1432|   		/*

Error: CLANG_WARNING: [#def714]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/conn.c:1531:6: warning[deadcode.DeadStores]: Value stored to 'err' is never read
# 1529|   					}
# 1530|   					/* leave the target candidate, but record the error for later use */
# 1531|-> 					err = lerr;
# 1532|   
# 1533|   					if ( lerr == LDAP_UNAVAILABLE && mt->mt_isquarantined != LDAP_BACK_FQ_NO ) {

Error: CPPCHECK_WARNING (CWE-457): [#def715]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/dncache.c:105: error[uninitvar]: Uninitialized variables: tmp_entry.target, tmp_entry.lastupdated
#  103|   	ldap_pvt_thread_mutex_lock( &cache->mutex );
#  104|   	entry = ( metadncacheentry_t * )ldap_avl_find( cache->tree,
#  105|-> 			( caddr_t )&tmp_entry, meta_dncache_cmp );
#  106|   
#  107|   	if ( entry != NULL ) {

Error: CPPCHECK_WARNING (CWE-457): [#def716]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/dncache.c:161: warning[uninitvar]: Uninitialized variables: tmp_entry.target, tmp_entry.lastupdated
#  159|   	ldap_pvt_thread_mutex_lock( &cache->mutex );
#  160|   	entry = ( metadncacheentry_t * )ldap_avl_find( cache->tree,
#  161|-> 			( caddr_t )&tmp_entry, meta_dncache_cmp );
#  162|   
#  163|   	if ( entry != NULL ) {

Error: CPPCHECK_WARNING (CWE-457): [#def717]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/dncache.c:212: error[uninitvar]: Uninitialized variables: tmp_entry.target, tmp_entry.lastupdated
#  210|   
#  211|   	ldap_pvt_thread_mutex_lock( &cache->mutex );
#  212|-> 	entry = ldap_avl_delete( &cache->tree, ( caddr_t )&tmp_entry,
#  213|    			meta_dncache_cmp );
#  214|   	ldap_pvt_thread_mutex_unlock( &cache->mutex );

Error: CPPCHECK_WARNING: [#def718]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/init.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def719]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/init.c: scope_hint: In function ‘meta_back_db_open’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/init.c:243:28: warning[-Wunused-variable]: unused variable ‘rc’
#  243 |         int             i, rc;
#      |                            ^~
#  241|   	char msg[SLAP_TEXT_BUFLEN];
#  242|   
#  243|-> 	int		i, rc;
#  244|   
#  245|   	if ( mi->mi_ntargets == 0 ) {

Error: CPPCHECK_WARNING: [#def720]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/map.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def721]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/map.c:136: warning[uninitvar]: Uninitialized variable: fmapping.dst
#  134|   
#  135|   	fmapping.src = *s;
#  136|-> 	*m = (struct ldapmapping *)ldap_avl_find( tree, (caddr_t)&fmapping, mapping_cmp );
#  137|   	if ( *m == NULL ) {
#  138|   		return map->drop_missing;

Error: CPPCHECK_WARNING: [#def722]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/search.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def723]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/search.c:781:25: warning[-Wunused-but-set-variable]: variable ‘last’ set but not used
#  781 |         int             last = 0, ncandidates = 0,
#      |                         ^~~~
#  779|   	int		rc = 0, sres = LDAP_SUCCESS;
#  780|   	char		*matched = NULL;
#  781|-> 	int		last = 0, ncandidates = 0,
#  782|   			initial_candidates = 0, candidate_match = 0,
#  783|   			needbind = 0;

Error: COMPILER_WARNING (CWE-563): [#def724]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/search.c: scope_hint: In function ‘meta_back_search’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/search.c:985:25: warning[-Wunused-but-set-variable]: variable ‘doabandon’ set but not used
#  985 |                         doabandon = 0,
#      |                         ^~~~~~~~~
#  983|   	for ( rc = 0; ncandidates > 0; ) {
#  984|   		int	gotit = 0,
#  985|-> 			doabandon = 0,
#  986|   			alreadybound = ncandidates;
#  987|   

Error: COMPILER_WARNING: [#def725]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/search.c:1496:60: warning[-Wformat-truncation=]: ‘ meta_back_search[’ directive output may be truncated writing 18 bytes into a region of size between 1 and 256
# 1496 |                                                         "%s meta_back_search[%ld] "
#      |                                                            ^~~~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/search.c:1496:57: note: directive argument in the range [0, 2147483646]
# 1496 |                                                         "%s meta_back_search[%ld] "
#      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/search.c:1496:57: note: directive argument in the range [-2147483648, 2147483647]
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 36 and 310 bytes into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
# 1494|   						char buf[ SLAP_TEXT_BUFLEN ];
# 1495|   						snprintf( buf, sizeof( buf ),
# 1496|-> 							"%s meta_back_search[%ld] "
# 1497|   							"match=\"%s\" err=%ld",
# 1498|   							op->o_log_prefix, i,

Error: COMPILER_WARNING: [#def726]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def727]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-meta/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_meta 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def728]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/backend.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def729]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/cache.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def730]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/cache.c:86:17: warning[-Wunused-variable]: unused variable ‘ep’
#   86 |         Entry **ep = NULL, *prev = NULL;
#      |                 ^~
#   84|   {
#   85|   	monitor_cache_t tmp_mc, *mc, *pmc = NULL;
#   86|-> 	Entry **ep = NULL, *prev = NULL;
#   87|   	int		rc = -1;
#   88|   

Error: COMPILER_WARNING (CWE-563): [#def731]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/cache.c: scope_hint: In function ‘monitor_cache_add’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/cache.c:86:29: warning[-Wunused-variable]: unused variable ‘prev’
#   86 |         Entry **ep = NULL, *prev = NULL;
#      |                             ^~~~
#   84|   {
#   85|   	monitor_cache_t tmp_mc, *mc, *pmc = NULL;
#   86|-> 	Entry **ep = NULL, *prev = NULL;
#   87|   	int		rc = -1;
#   88|   

Error: CPPCHECK_WARNING (CWE-457): [#def732]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/cache.c:209: error[uninitvar]: Uninitialized variable: tmp_mc.mc_e
#  207|   	ldap_pvt_thread_mutex_lock( &mi->mi_cache_lock );
#  208|   	mc = ( monitor_cache_t * )ldap_avl_find( mi->mi_cache,
#  209|-> 			( caddr_t )&tmp_mc, monitor_cache_cmp );
#  210|   
#  211|   	if ( mc != NULL ) {

Error: COMPILER_WARNING (CWE-1164): [#def733]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/cache.c: scope_hint: In function ‘monitor_cache_remove’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/cache.c:243:1: warning[-Wunused-label]: label ‘retry’ defined but not used
#  243 | retry:;
#      | ^~~~~
#  241|   	dnParent( ndn, &pndn );
#  242|   
#  243|-> retry:;
#  244|   	ldap_pvt_thread_mutex_lock( &mi->mi_cache_lock );
#  245|   

Error: CPPCHECK_WARNING (CWE-457): [#def734]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/cache.c:248: error[uninitvar]: Uninitialized variable: tmp_mc.mc_e
#  246|   	tmp_mc.mc_ndn = *ndn;
#  247|   	mc = ( monitor_cache_t * )ldap_avl_find( mi->mi_cache,
#  248|-> 			( caddr_t )&tmp_mc, monitor_cache_cmp );
#  249|   
#  250|   	if ( mc != NULL ) {

Error: CPPCHECK_WARNING: [#def735]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/conn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def736]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/conn.c:71:2: warning[deadcode.DeadStores]: Value stored to 'mp' is never read
#   69|   	}
#   70|   
#   71|-> 	mp = ( monitor_entry_t * )e_conn->e_private;
#   72|   
#   73|   	/*

Error: CPPCHECK_WARNING: [#def737]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/database.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def738]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/database.c: scope_hint: In function ‘monitor_subsys_overlay_init_one’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/database.c:117:34: warning[-Wunused-but-set-variable]: variable ‘bi’ set but not used
#  117 |         BackendInfo             *bi;
#      |                                  ^~
#  115|   	slap_overinst		*on2;
#  116|   	slap_overinfo		*oi = NULL;
#  117|-> 	BackendInfo		*bi;
#  118|   	monitor_entry_t		*mp_overlay;
#  119|   	struct berval		bv;

Error: CLANG_WARNING: [#def739]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/database.c:124:2: warning[deadcode.DeadStores]: Value stored to 'bi' is never read
#  122|   
#  123|   	oi = (slap_overinfo *)be->bd_info->bi_private;
#  124|-> 	bi = oi->oi_orig;
#  125|   
#  126|   	/* find the overlay number, o */

Error: COMPILER_WARNING (CWE-457): [#def740]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/database.c: scope_hint: In function ‘monitor_subsys_database_init_one’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/database.c:370:37: warning[-Wmaybe-uninitialized]: ‘e_overlay’ may be used uninitialized
#  370 |                                 *ep = e_overlay;
#      |                                 ~~~~^~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/database.c:363:34: note: ‘e_overlay’ was declared here
#  363 |                 Entry           *e_overlay;
#      |                                  ^~~~~~~~~
#  368|   				ms, ms_overlay, on, e, &e_overlay );
#  369|   			if ( overlay == on ) {
#  370|-> 				*ep = e_overlay;
#  371|   			}
#  372|   		}

Error: CPPCHECK_WARNING: [#def741]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def742]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c:808:8: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'elpp')
#  806|   
#  807|   done_limbo:;
#  808|-> 		if ( *elpp != NULL ) {
#  809|   			el.el_next = NULL;
#  810|   			**elpp = el;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def743]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c: scope_hint: In function ‘monitor_back_register_entry_parent’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c:808:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘elpp’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c:22: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/back-monitor.h:331: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c:31: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c:2314:14: note: in expansion of macro ‘monitor_entrypriv_create’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:54: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c:28: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c:641:14: note: in expansion of macro ‘BER_BVISNULL’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:159:22: note: in expansion of macro ‘ldap_debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c:777:25: note: in expansion of macro ‘Debug’
#  806|   
#  807|   done_limbo:;
#  808|-> 		if ( *elpp != NULL ) {
#  809|   			el.el_next = NULL;
#  810|   			**elpp = el;

Error: CLANG_WARNING: [#def744]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c:1363:8: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 1361|   
# 1362|   			if ( elp->el_type == LIMBO_ENTRY_PARENT
# 1363|-> 				&& dn_match( nrdn, &elp->el_e->e_nname )
# 1364|   				&& dn_match( nbase, &elp->el_nbase )
# 1365|   				&& scope == elp->el_scope

Error: CLANG_WARNING: [#def745]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c:1363:8: warning[core.NullDereference]: Access to field 'bv_len' results in a dereference of a null pointer (loaded from variable 'nrdn')
# 1361|   
# 1362|   			if ( elp->el_type == LIMBO_ENTRY_PARENT
# 1363|-> 				&& dn_match( nrdn, &elp->el_e->e_nname )
# 1364|   				&& dn_match( nbase, &elp->el_nbase )
# 1365|   				&& scope == elp->el_scope

Error: COMPILER_WARNING (CWE-665): [#def746]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c: scope_hint: In function ‘monitor_back_initialize’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/init.c:1642:43: warning[-Wmissing-braces]: missing braces around initializer
# 1642 |         static ConfigTable monitorcfg[] = {
#      |                                           ^
# 1640|   	};
# 1641|   
# 1642|-> 	static ConfigTable monitorcfg[] = {
# 1643|   		{ NULL, NULL, 0, 0, 0, ARG_IGNORED,
# 1644|   			NULL, NULL, NULL, NULL }

Error: CPPCHECK_WARNING: [#def747]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/listener.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def748]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/log.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def749]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/operation.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def750]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/operational.c:67:3: warning[deadcode.DeadStores]: Value stored to 'ap' is never read
#   65|   		*ap = slap_operational_hasSubordinate( hs );
#   66|   		assert( *ap != NULL );
#   67|-> 		ap = &(*ap)->a_next;
#   68|   	}
#   69|   	

Error: CPPCHECK_WARNING: [#def751]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/overlay.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def752]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/rww.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def753]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/sent.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def754]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/thread.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def755]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/time.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def756]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def757]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_monitor 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def758]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-null/null.c:36:32: warning[-Wmissing-braces]: missing braces around initializer
#   36 | static ConfigTable nullcfg[] = {
#      |                                ^
#   34|   } null_info;
#   35|   
#   36|-> static ConfigTable nullcfg[] = {
#   37|   	{ "bind", "true|FALSE", 1, 2, 0, ARG_ON_OFF|ARG_OFFSET,
#   38|   		(void *)offsetof(null_info, ni_bind_allowed),

Error: COMPILER_WARNING: [#def759]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-null/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def760]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-null/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_null 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def761]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-passwd/config.c:43:34: warning[-Wmissing-braces]: missing braces around initializer
#   43 | static ConfigTable passwdcfg[] = {
#      |                                  ^
#   41|   #include "slap-config.h"
#   42|   
#   43|-> static ConfigTable passwdcfg[] = {
#   44|   	{ "file", "filename", 2, 2, 0,
#   45|   #ifdef HAVE_SETPWFILE

Error: CPPCHECK_WARNING: [#def762]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-passwd/search.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def763]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-passwd/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def764]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-passwd/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_passwd 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def765]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/add.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def766]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/bind.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def767]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/close.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def768]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/compare.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def769]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/config.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def770]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/config.c:29:32: warning[-Wmissing-braces]: missing braces around initializer
#   29 | static ConfigTable perlcfg[] = {
#      |                                ^
#   27|   };
#   28|   
#   29|-> static ConfigTable perlcfg[] = {
#   30|   	{ "perlModule", "module", 2, 2, 0,
#   31|   		ARG_STRING|ARG_MAGIC|PERL_MODULE, perl_cf, 

Error: COMPILER_WARNING (CWE-563): [#def771]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/config.c: scope_hint: At top level
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/config.c:68:18: warning[-Wunused-variable]: ‘ovperlocs’ defined but not used
#   68 | static ConfigOCs ovperlocs[] = {
#      |                  ^~~~~~~~~
#   66|   };
#   67|   
#   68|-> static ConfigOCs ovperlocs[] = {
#   69|   	{ "( OLcfgDbOc:11.2 "
#   70|   		"NAME 'olcovPerlConfig' "

Error: COMPILER_WARNING (CWE-563): [#def772]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/config.c: scope_hint: In function ‘perl_cf’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/config.c:116:13: warning[-Wunused-but-set-variable]: variable ‘loc_sv’ set but not used
#  116 |         SV* loc_sv;
#      |             ^~~~~~
#  114|   {
#  115|   	PerlBackend *pb = (PerlBackend *) c->be->be_private;
#  116|-> 	SV* loc_sv;
#  117|   	int count ;
#  118|   	int args;

Error: COMPILER_WARNING: [#def773]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/config.c: scope_hint: In function ‘perl_cf’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/config.c:184:76: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 4123 bytes into a region of size 256
#  184 |                                 snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s: error %s",
#      |                                                                            ^~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 9 or more bytes (assuming 4132) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  182|   				STRLEN len;
#  183|   
#  184|-> 				snprintf( c->cr_msg, sizeof( c->cr_msg ), "%s: error %s",
#  185|   					c->log, SvPV(ERRSV, len ));
#  186|   				Debug( LDAP_DEBUG_ANY, "%s\n", c->cr_msg );

Error: CLANG_WARNING: [#def774]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/config.c:211:4: warning[deadcode.DeadStores]: Value stored to 'loc_sv' is never read
#  209|   		case PERL_PATH:
#  210|   			snprintf( eval_str, EVAL_BUF_SIZE, "push @INC, '%s';", c->argv[1] );
#  211|-> 			loc_sv = eval_pv( eval_str, 0 );
#  212|   			/* XXX loc_sv return value is ignored. */
#  213|   			ber_str2bv( c->argv[1], 0, 0, &bv );

Error: CPPCHECK_WARNING: [#def775]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/delete.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def776]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/init.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def777]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/modify.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def778]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/modrdn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def779]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/search.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def780]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def781]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-perl/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_perl 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def782]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-relay/init.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def783]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-relay/init.c:33:33: warning[-Wmissing-braces]: missing braces around initializer
#   33 | static ConfigTable relaycfg[] = {
#      |                                 ^
#   31|   static ConfigDriver relay_back_cf;
#   32|   
#   33|-> static ConfigTable relaycfg[] = {
#   34|   	{ "relay", "relay", 2, 2, 0,
#   35|   		ARG_MAGIC|ARG_DN|ARG_QUOTE,

Error: CPPCHECK_WARNING: [#def784]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-relay/op.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def785]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-relay/op.c:149:14: warning[core.NullDereference]: Access to field 'sr_ref' results in a dereference of a null pointer (loaded from variable 'rs')
#  147|   
#  148|   		/* if we set sr_err to LDAP_REFERRAL, we must provide one */
#  149|-> 		rs->sr_ref = referral_rewrite(
#  150|   			default_referral, NULL, &op->o_req_dn,
#  151|   			op->o_tag == LDAP_REQ_SEARCH ?

Error: GCC_ANALYZER_WARNING (CWE-476): [#def786]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-relay/op.c: scope_hint: In function ‘relay_back_select_backend’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-relay/op.c:149:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rs’
#  147|   
#  148|   		/* if we set sr_err to LDAP_REFERRAL, we must provide one */
#  149|-> 		rs->sr_ref = referral_rewrite(
#  150|   			default_referral, NULL, &op->o_req_dn,
#  151|   			op->o_tag == LDAP_REQ_SEARCH ?

Error: CLANG_WARNING: [#def787]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-relay/op.c:164:14: warning[core.NullDereference]: Access to field 'sr_err' results in a dereference of a null pointer (loaded from variable 'rs')
#  162|   
#  163|   	if ( fail_mode & RB_BDERR ) {
#  164|-> 		rs->sr_err = rc;
#  165|   		if ( fail_mode & RB_SEND ) {
#  166|   			send_ldap_result( op, rs );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def788]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-relay/op.c:164:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rs’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:54: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-relay/op.c:26: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-relay/op.c:126:29: note: in expansion of macro ‘BER_BVISNULL’
#  162|   
#  163|   	if ( fail_mode & RB_BDERR ) {
#  164|-> 		rs->sr_err = rc;
#  165|   		if ( fail_mode & RB_SEND ) {
#  166|   			send_ldap_result( op, rs );

Error: CPPCHECK_WARNING (CWE-562): [#def789]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-relay/op.c:210: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  208|   		relay_callback	rcb;
#  209|   
#  210|-> 		relay_back_add_cb( &rcb, op );
#  211|   		RELAY_WRAP_OP( op, bd, which, {
#  212|   			rc = (&bi->bi_op_bind)[which]( op, rs );

Error: COMPILER_WARNING: [#def790]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-relay/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def791]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-relay/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_relay 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: COMPILER_WARNING (CWE-665): [#def792]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-sock/config.c:46:30: warning[-Wmissing-braces]: missing braces around initializer
#   46 | static ConfigTable bscfg[] = {
#      |                              ^
#   44|   #define NUM_OV_ATTRS	3
#   45|   
#   46|-> static ConfigTable bscfg[] = {
#   47|   	{ "sockops", "ops", 2, 0, 0, ARG_MAGIC|BS_OPS,
#   48|   		bs_cf_gen, "( OLcfgDbAt:7.3 NAME 'olcOvSocketOps' "

Error: CPPCHECK_WARNING: [#def793]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-sock/result.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def794]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-sock/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def795]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-sock/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: back_sock 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def796]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backend.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def797]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backend.c:1490:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1488|   	if ( target && dn_match( &target->e_nname, gr_ndn ) ) {
# 1489|   		e = target;
# 1490|-> 		rc = 0;
# 1491|   
# 1492|   	} else {

Error: CLANG_WARNING: [#def798]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backend.c:1494:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1492|   	} else {
# 1493|   		op->o_private = NULL;
# 1494|-> 		rc = be_entry_get_rw( op, gr_ndn, group_oc, group_at, 0, &e );
# 1495|   		e_priv = op->o_private;
# 1496|   		op->o_private = o_priv;

Error: CLANG_WARNING: [#def799]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backend.c:2006:3: warning[deadcode.DeadStores]: Value stored to 'ap' is never read
# 2004|   	{
# 2005|   		*ap = slap_operational_subschemaSubentry( op->o_bd );
# 2006|-> 		ap = &(*ap)->a_next;
# 2007|   	}
# 2008|   

Error: CPPCHECK_WARNING: [#def800]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backglue.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def801]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backglue.c: scope_hint: In function ‘glue_back_select’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backglue.c:81:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘on’
#   79|   		}
#   80|   	}
#   81|-> 	be->bd_info = on->on_info->oi_orig;
#   82|   	return be;
#   83|   }

Error: CLANG_WARNING: [#def802]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backglue.c:291:13: warning[deadcode.DeadStores]: Value stored to 'be' during its initialization is never read
#  289|   glue_response ( Operation *op, SlapReply *rs )
#  290|   {
#  291|-> 	BackendDB *be = op->o_bd;
#  292|   	be = glue_back_select (op->o_bd, &op->o_req_ndn);
#  293|   

Error: CPPCHECK_WARNING (CWE-562): [#def803]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backglue.c:461: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  459|   	case LDAP_SCOPE_SUBTREE:
#  460|   	case LDAP_SCOPE_SUBORDINATE: /* FIXME */
#  461|-> 		op->o_callback = &cb;
#  462|   		rs->sr_err = gs.err = LDAP_UNWILLING_TO_PERFORM;
#  463|   		scope0 = op->ors_scope;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def804]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backglue.c: scope_hint: In function ‘glue_open’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backglue.c:861:35: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  859|   			/* Same bi_open as our main backend? */
#  860|   			if ( gi->gi_n[i].gn_be->bd_info->bi_open ==
#  861|-> 				on->on_info->oi_orig->bi_open )
#  862|   				bsame = 1;
#  863|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def805]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backglue.c:883:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  881|   			if ( rc ) break;
#  882|   		}
#  883|-> 		if ( !rc && !bsame && on->on_info->oi_orig->bi_open )
#  884|   			rc = on->on_info->oi_orig->bi_open( on->on_info->oi_orig );
#  885|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def806]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backglue.c: scope_hint: In function ‘glue_tool_sync’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backglue.c:1292:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1290|   		if (gi->gi_n[i].gn_be->be_sync)
# 1291|   			gi->gi_n[i].gn_be->be_sync (gi->gi_n[i].gn_be);
# 1292|-> 	b0->bd_info = on->on_info->oi_orig;
# 1293|   	if ( b0->be_sync )
# 1294|   		b0->be_sync( b0 );

Error: CPPCHECK_WARNING: [#def807]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def808]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:220:8: warning[deadcode.DeadStores]: Value stored to 'next' is never read
#  218|   	on = oi->oi_list;
#  219|   	if ( on ) {
#  220|-> 		for (next = on->on_next; on; on=next) {
#  221|   			next = on->on_next;
#  222|   			free( on );

Error: CPPCHECK_WARNING (CWE-562): [#def809]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:239: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  237|   
#  238|   	db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  239|-> 	op->o_bd = &db;
#  240|   	for (; on; on=on->on_next ) {
#  241|   		if ( on->on_bi.bi_flags & SLAPO_BFLAG_DISABLED )

Error: CPPCHECK_WARNING (CWE-562): [#def810]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:295: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  293|    				db = *op->o_bd;
#  294|   				db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  295|-> 				op->o_bd = &db;
#  296|   			}
#  297|   

Error: CPPCHECK_WARNING (CWE-562): [#def811]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:360: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  358|    				db = *op->o_bd;
#  359|   				db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  360|-> 				op->o_bd = &db;
#  361|   			}
#  362|   

Error: CPPCHECK_WARNING (CWE-562): [#def812]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:435: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  433|    				db = *op->o_bd;
#  434|   				db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  435|-> 				op->o_bd = &db;
#  436|   			}
#  437|   

Error: CPPCHECK_WARNING (CWE-562): [#def813]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:517: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  515|    				db = *op->o_bd;
#  516|   				db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  517|-> 				op->o_bd = &db;
#  518|   			}
#  519|   

Error: CPPCHECK_WARNING (CWE-562): [#def814]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:590: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  588|    				db = *op->o_bd;
#  589|   				db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  590|-> 				op->o_bd = &db;
#  591|   			}
#  592|   

Error: CPPCHECK_WARNING (CWE-562): [#def815]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:754: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  752|    		db = *op->o_bd;
#  753|   		db.be_flags |= SLAP_DBFLAG_OVERLAY;
#  754|-> 		op->o_bd = &db;
#  755|   	}
#  756|   	if ( op->o_tag != LDAP_REQ_ABANDON && op->o_tag != LDAP_REQ_UNBIND ) {

Error: CLANG_WARNING: [#def816]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:769:13: warning[core.UndefinedBinaryOperatorResult]: The right operand of '==' is a garbage value
#  767|   	if ( rc != SLAPD_ASYNCOP && op->o_tag != LDAP_REQ_ABANDON && op->o_tag != LDAP_REQ_UNBIND ) {
#  768|   		for ( sc = &op->o_callback; *sc; sc = &(*sc)->sc_next ) {
#  769|-> 			if ( *sc == cb ) {
#  770|   				*sc = cb->sc_next;
#  771|   				op->o_tmpfree( cb, op->o_tmpmemctx );

Error: GCC_ANALYZER_WARNING (CWE-457): [#def817]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c: scope_hint: In function ‘over_op_func’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:769:28: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘cb’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:19: included_from: Included from here.
#  767|   	if ( rc != SLAPD_ASYNCOP && op->o_tag != LDAP_REQ_ABANDON && op->o_tag != LDAP_REQ_UNBIND ) {
#  768|   		for ( sc = &op->o_callback; *sc; sc = &(*sc)->sc_next ) {
#  769|-> 			if ( *sc == cb ) {
#  770|   				*sc = cb->sc_next;
#  771|   				op->o_tmpfree( cb, op->o_tmpmemctx );

Error: COMPILER_WARNING (CWE-457): [#def818]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c: scope_hint: In function ‘over_op_func’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:769:28: warning[-Wmaybe-uninitialized]: ‘cb’ may be used uninitialized
#  769 |                         if ( *sc == cb ) {
#      |                            ^
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:741:24: note: ‘cb’ was declared here
#  741 |         slap_callback *cb;
#      |                        ^~
#  767|   	if ( rc != SLAPD_ASYNCOP && op->o_tag != LDAP_REQ_ABANDON && op->o_tag != LDAP_REQ_UNBIND ) {
#  768|   		for ( sc = &op->o_callback; *sc; sc = &(*sc)->sc_next ) {
#  769|-> 			if ( *sc == cb ) {
#  770|   				*sc = cb->sc_next;
#  771|   				op->o_tmpfree( cb, op->o_tmpmemctx );

Error: CLANG_WARNING: [#def819]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:1309:9: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'prev')
# 1307|   		prev = &oi->oi_list;
# 1308|   		for ( i=0; i<idx; i++ ) {
# 1309|-> 			on = *prev;
# 1310|   			prev = &on->on_next;
# 1311|   		}

Error: CLANG_WARNING: [#def820]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/backover.c:1313:18: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'prev')
# 1311|   		}
# 1312|   		/* insert */
# 1313|-> 		on2->on_next = *prev;
# 1314|   		*prev = on2;
# 1315|   	}

Error: CPPCHECK_WARNING: [#def821]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def822]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:293:45: warning[-Wmissing-braces]: missing braces around initializer
#  293 | static ConfigTable config_back_cf_table[] = {
#      |                                             ^
#  291|   /* alphabetical ordering */
#  292|   
#  293|-> static ConfigTable config_back_cf_table[] = {
#  294|   	/* This attr is read-only */
#  295|   	{ "", "", 0, 0, 0, ARG_MAGIC,

Error: COMPILER_WARNING (CWE-665): [#def823]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:951:34: warning[-Wmissing-braces]: missing braces around initializer
#  951 | ConfigTable olcDatabaseDummy[] = {
#      |                                  ^
#  949|   
#  950|   /* Need to no-op this keyword for dynamic config */
#  951|-> ConfigTable olcDatabaseDummy[] = {
#  952|   	{ "", "", 0, 0, 0, ARG_IGNORED,
#  953|   		NULL, "( OLcfgGlAt:13 NAME 'olcDatabase' "

Error: CPPCHECK_WARNING (CWE-457): [#def824]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:1677: warning[uninitvar]: Uninitialized variable: *prev
# 1675|   					prev = &a->acl_next;
# 1676|   				}
# 1677|-> 				a = *prev;
# 1678|   				*prev = a->acl_next;
# 1679|   				acl_free( a );

Error: CPPCHECK_WARNING (CWE-457): [#def825]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:2253: warning[uninitvar]: Uninitialized variable: sv
# 2251|   				svtail = sv;
# 2252|   			}
# 2253|-> 			sv->al_next = NULL;
# 2254|   			for ( sv = svnew; sv; sv = sv->al_next )
# 2255|   				sv->al_desc->ad_type->sat_flags |= SLAP_AT_SORTED_VAL;

Error: COMPILER_WARNING (CWE-457): [#def826]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c: scope_hint: In function ‘config_generic’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:2253:37: warning[-Wmaybe-uninitialized]: ‘svtail’ may be used uninitialized
# 2253 |                         sv->al_next = NULL;
#      |                                     ^
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:2218:48: note: ‘svtail’ was declared here
# 2218 |                         ADlist *svnew = NULL, *svtail, *sv;
#      |                                                ^~~~~~
# 2251|   				svtail = sv;
# 2252|   			}
# 2253|-> 			sv->al_next = NULL;
# 2254|   			for ( sv = svnew; sv; sv = sv->al_next )
# 2255|   				sv->al_desc->ad_type->sat_flags |= SLAP_AT_SORTED_VAL;

Error: CPPCHECK_WARNING (CWE-562): [#def827]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:6420: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 6418|   		slap_unpause_server();
# 6419|   out:
# 6420|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 6421|   	send_ldap_result( op, rs );
# 6422|   	slap_graduate_commit_csn( op );

Error: COMPILER_WARNING (CWE-457): [#def828]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:6632:29: warning[-Wmaybe-uninitialized]: ‘ixnew’ may be used uninitialized
# 6632 |                 for ( i=0; i<ixnew; i++ ) {
#      |                            ~^~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:6432:20: note: ‘ixnew’ was declared here
# 6432 |         int ixold, ixnew, dopause = 1;
#      |                    ^~~~~
# 6630|   		/* Insert into new slot */
# 6631|   		cprev = cbprev;
# 6632|-> 		for ( i=0; i<ixnew; i++ ) {
# 6633|   			ce2 = *cprev;
# 6634|   			if ( !ce2 )

Error: COMPILER_WARNING (CWE-457): [#def829]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c: scope_hint: In function ‘config_back_modrdn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:6649:20: warning[-Wmaybe-uninitialized]: ‘ixold’ may be used uninitialized
# 6649 |                 if ( ixold < ixnew ) {
#      |                    ^
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:6432:13: note: ‘ixold’ was declared here
# 6432 |         int ixold, ixnew, dopause = 1;
#      |             ^~~~~
# 6647|   			overlay_move( ce->ce_be, (slap_overinst *)ce->ce_bi, ixnew );
# 6648|   			
# 6649|-> 		if ( ixold < ixnew ) {
# 6650|   			rs->sr_err = config_rename_del( op, rs, ce, ceold, ixold,
# 6651|   				cfb->cb_use_ldif );

Error: CPPCHECK_WARNING (CWE-562): [#def830]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:6679: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 6677|   		slap_unpause_server();
# 6678|   out:
# 6679|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 6680|   	send_ldap_result( op, rs );
# 6681|   	return rs->sr_err;

Error: CPPCHECK_WARNING (CWE-562): [#def831]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:6856: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 6854|   	}
# 6855|   out:
# 6856|-> 	if ( num_ctrls ) rs->sr_ctrls = ctrls;
# 6857|   #else
# 6858|   	rs->sr_err = LDAP_UNWILLING_TO_PERFORM;

Error: CPPCHECK_WARNING (CWE-457): [#def832]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bconfig.c:7563: warning[uninitvar]: Uninitialized variables: vl.vl_next, vl.vl_ptr
# 7561|   				vl->vl_ptr = on;
# 7562|   			}
# 7563|-> 			for (j=0; vl; j++,vl=v0) {
# 7564|   				on = vl->vl_ptr;
# 7565|   				v0 = vl->vl_next;

Error: CPPCHECK_WARNING: [#def833]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bind.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-1164): [#def834]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bind.c: scope_hint: In function ‘fe_op_lastbind’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/bind.c:506:1: warning[-Wunused-label]: label ‘done’ defined but not used
#  506 | done:
#      | ^~~~
#  504|   	slap_mods_free( m, 1 );
#  505|   
#  506|-> done:
#  507|   	return rc;
#  508|   }

Error: CPPCHECK_WARNING: [#def835]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/cancel.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def836]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/ch_malloc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def837]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/config.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-681): [#def838]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/config.c: scope_hint: In function ‘config_find_keyword’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/config.c:137:56: warning[-Wpointer-sign]: pointer targets in passing argument 2 of ‘lutil_b64_pton’ differ in signedness
#  137 |                 c->linelen = lutil_b64_pton( c->line, c->tline, decode_len );
#      |                                                       ~^~~~~~~
#      |                                                        |
#      |                                                        char *
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1189: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/config.c:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/lutil.h:55:9: note: expected ‘unsigned char *’ but argument is of type ‘char *’
#   55 |         unsigned char *,
#      |         ^~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  135|   		ch_free( c->tline );
#  136|   		c->tline = ch_malloc( decode_len+1 );
#  137|-> 		c->linelen = lutil_b64_pton( c->line, c->tline, decode_len );
#  138|   		if ( c->linelen < 0 )
#  139|   		{

Error: CLANG_WARNING: [#def839]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/config.c:177:9: warning[deadcode.DeadStores]: Value stored to 'ignored' during its initialization is never read
#  175|   	}
#  176|   	if(Conf->max_args && (c->argc > Conf->max_args)) {
#  177|-> 		char	*ignored = " ignored";
#  178|   
#  179|   		snprintf( c->cr_msg, sizeof( c->cr_msg ), "<%s> extra cruft after <%s>",

Error: CLANG_WARNING: [#def840]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/config.c:2048:10: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'next')
# 2046|   		next = line;
# 2047|   	}
# 2048|-> 	while ( *next && strchr( sep, *next ) ) {
# 2049|   		next++;
# 2050|   	}

Error: CLANG_WARNING: [#def841]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/config.c:2208:32: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 2206|   	if (inquote) {
# 2207|   		/* these directives parse c->line independently of argv tokenizing */
# 2208|-> 		for(i = 0; raw[i]; i++) if (!strcasecmp(c->argv[0], raw[i])) return 0;
# 2209|   
# 2210|   		Debug(LDAP_DEBUG_ANY, "%s: unterminated quoted string \"%s\"\n", c->log, c->argv[c->argc-1] );

Error: CPPCHECK_WARNING: [#def842]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/connection.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def843]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/controls.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def844]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/controls.c: scope_hint: In function ‘register_control_exop’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/controls.c:385:16: warning[-Wunused-variable]: unused variable ‘extendedops’
#  385 |         char **extendedops;
#      |                ^~~~~~~~~~~
#  383|   	struct slap_control *sc = NULL;
#  384|   	BerVarray extendedopsbv;
#  385|-> 	char **extendedops;
#  386|   	int i;
#  387|   

Error: CLANG_WARNING: [#def845]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/controls.c:1890:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
# 1888|   
# 1889|   	if ( len == 0 ) {
# 1890|-> 		tag = ber_skip_tag( ber, &len );
# 1891|   
# 1892|   	} else if ( len > 128 ) {

Error: CLANG_WARNING: [#def846]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/controls.c:1898:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
# 1896|   
# 1897|   	} else {
# 1898|-> 		tag = ber_scanf( ber, "m", &sessionSourceIp );
# 1899|   	}
# 1900|   

Error: CLANG_WARNING: [#def847]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/controls.c:1913:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
# 1911|   
# 1912|   	if ( len == 0 ) {
# 1913|-> 		tag = ber_skip_tag( ber, &len );
# 1914|   
# 1915|   	} else if ( len > 65536 ) {

Error: CLANG_WARNING: [#def848]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/controls.c:1921:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
# 1919|   
# 1920|   	} else {
# 1921|-> 		tag = ber_scanf( ber, "m", &sessionSourceName );
# 1922|   	}
# 1923|   

Error: CLANG_WARNING: [#def849]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/controls.c:1971:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
# 1969|   
# 1970|   	if ( len == 0 ) {
# 1971|-> 		tag = ber_skip_tag( ber, &len );
# 1972|   
# 1973|   	} else {

Error: CLANG_WARNING: [#def850]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/controls.c:1975:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
# 1973|   	} else {
# 1974|   		/* note: should not be more than 65536... */
# 1975|-> 		tag = ber_scanf( ber, "m", &sessionTrackingIdentifier );
# 1976|   		if ( ldif_is_not_printable( sessionTrackingIdentifier.bv_val, sessionTrackingIdentifier.bv_len ) ) {
# 1977|   			/* we want the OID printed, at least */

Error: CPPCHECK_WARNING: [#def851]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/cr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def852]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/ctxcsn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def853]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def854]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c: scope_hint: In function ‘slapd_remove’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:458:17: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
#  458 |         int fd, rc, index = SLAP_EPOLL_SOCK_IX(t,(s)); \
#      |                 ^~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:1161:9: note: in expansion of macro ‘SLAP_SOCK_DEL’
# 1161 |         SLAP_SOCK_DEL(id, s);
#      |         ^~~~~~~~~~~~~
#  456|   
#  457|   # define SLAP_SOCK_DEL(t,s)		do { \
#  458|-> 	int fd, rc, index = SLAP_EPOLL_SOCK_IX(t,(s)); \
#  459|   	if ( index < 0 ) break; \
#  460|   	rc = epoll_ctl(slap_daemon[t].sd_epfd, EPOLL_CTL_DEL, \

Error: CPPCHECK_WARNING (CWE-476): [#def855]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:1391: warning[nullPointer]: Possible null pointer dereference: host
# 1389|   		sap[1] = NULL;
# 1390|   
# 1391|-> 		if ( strlen(host) >
# 1392|   			(sizeof(((struct sockaddr_un *)*sap)->sun_path) - 1) )
# 1393|   		{

Error: GCC_ANALYZER_WARNING (CWE-688): [#def856]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c: scope_hint: In function ‘slap_get_listener_addresses’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:1391:22: warning[-Wanalyzer-null-argument]: use of NULL ‘host’ where non-null expected
<built-in>: note: argument 1 of ‘__builtin_strlen’ must be non-null
# 1389|   		sap[1] = NULL;
# 1390|   
# 1391|-> 		if ( strlen(host) >
# 1392|   			(sizeof(((struct sockaddr_un *)*sap)->sun_path) - 1) )
# 1393|   		{

Error: COMPILER_WARNING (CWE-563): [#def857]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:2657:45: warning[-Wunused-but-set-variable]: variable ‘nwriters’ set but not used
# 2657 |                 int                     ns, nwriters;
#      |                                             ^~~~~~~~
# 2655|   	while ( !slapd_shutdown ) {
# 2656|   		ber_socket_t		i;
# 2657|-> 		int			ns, nwriters;
# 2658|   		int			at;
# 2659|   		ber_socket_t		nfds;

Error: COMPILER_WARNING (CWE-563): [#def858]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:2659:41: warning[-Wunused-but-set-variable]: variable ‘nfds’ set but not used
# 2659 |                 ber_socket_t            nfds;
#      |                                         ^~~~
# 2657|   		int			ns, nwriters;
# 2658|   		int			at;
# 2659|-> 		ber_socket_t		nfds;
# 2660|   #if SLAP_EVENTS_ARE_INDEXED
# 2661|   		ber_socket_t		nrfds, nwfds;

Error: CLANG_WARNING: [#def859]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:2740:3: warning[deadcode.DeadStores]: Value stored to 'nwriters' is never read
# 2738|   		ldap_pvt_thread_mutex_lock( &slap_daemon[tid].sd_mutex );
# 2739|   
# 2740|-> 		nwriters = slap_daemon[tid].sd_nwriters;
# 2741|   
# 2742|   		if ( listening )

Error: CLANG_WARNING: [#def860]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:2760:3: warning[deadcode.DeadStores]: Value stored to 'nfds' is never read
# 2758|   		SLAP_EVENT_INIT(tid);
# 2759|   
# 2760|-> 		nfds = SLAP_EVENT_MAX(tid);
# 2761|   
# 2762|   		if (( global_idletimeout ) && slap_daemon[tid].sd_nactives ) at = 1;

Error: COMPILER_WARNING (CWE-563): [#def861]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c: scope_hint: In function ‘slapd_daemon_task’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:3057:48: warning[-Wunused-but-set-variable]: variable ‘r’ set but not used
# 3057 |                         int rc = 1, fd, w = 0, r = 0;
#      |                                                ^
# 3055|   
# 3056|   		for ( i = 0; i < ns; i++ ) {
# 3057|-> 			int rc = 1, fd, w = 0, r = 0;
# 3058|   
# 3059|   			if ( SLAP_EVENT_IS_LISTENER( tid, i ) ) {

Error: CLANG_WARNING: [#def862]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:3108:6: warning[deadcode.DeadStores]: Value stored to 'r' is never read
# 3106|   #endif /* HAVE_KQUEUE */
# 3107|   				{
# 3108|-> 					r = 1;
# 3109|   					Debug( LDAP_DEBUG_CONNS,
# 3110|   						"daemon: read active on %d\n",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def863]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c: scope_hint: In function ‘slap_suspend_listeners’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:3558:39: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**slap_listeners.sl_sd’
# 3556|   {
# 3557|   	int i;
# 3558|-> 	for (i=0; slap_listeners[i]; i++) {
# 3559|   		slap_listeners[i]->sl_mute = 1;
# 3560|   		listen( slap_listeners[i]->sl_sd, 0 );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def864]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:3559:44: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**slap_listeners.sl_sd’
# 3557|   	int i;
# 3558|   	for (i=0; slap_listeners[i]; i++) {
# 3559|-> 		slap_listeners[i]->sl_mute = 1;
# 3560|   		listen( slap_listeners[i]->sl_sd, 0 );
# 3561|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def865]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c: scope_hint: In function ‘slap_resume_listeners’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:3569:39: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**slap_listeners.sl_sd’
# 3567|   {
# 3568|   	int i;
# 3569|-> 	for (i=0; slap_listeners[i]; i++) {
# 3570|   		slap_listeners[i]->sl_mute = 0;
# 3571|   		listen( slap_listeners[i]->sl_sd, SLAPD_LISTEN_BACKLOG );

Error: GCC_ANALYZER_WARNING (CWE-775): [#def866]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/daemon.c:3570:44: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘**slap_listeners.sl_sd’
# 3568|   	int i;
# 3569|   	for (i=0; slap_listeners[i]; i++) {
# 3570|-> 		slap_listeners[i]->sl_mute = 0;
# 3571|   		listen( slap_listeners[i]->sl_sd, SLAPD_LISTEN_BACKLOG );
# 3572|   	}

Error: CPPCHECK_WARNING (CWE-562): [#def867]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/delete.c:202: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  200|   					op->o_req_dn = pdn;
#  201|   					op->o_req_ndn = pdn;
#  202|-> 					op->o_callback = &cb;
#  203|   					op->o_bd->be_delete( op, rs );
#  204|   				} else {

Error: CPPCHECK_WARNING: [#def868]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/dn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def869]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/entry.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def870]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/entry.c: scope_hint: In function ‘entry_decode’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/entry.c:818:27: warning[-Wunused-but-set-variable]: variable ‘nvals’ set but not used
#  818 |         int i, j, nattrs, nvals;
#      |                           ^~~~~
#  816|   #endif
#  817|   {
#  818|-> 	int i, j, nattrs, nvals;
#  819|   	int rc;
#  820|   	Attribute *a;

Error: CLANG_WARNING: [#def871]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/entry.c:828:2: warning[deadcode.DeadStores]: Value stored to 'nvals' is never read
#  826|   
#  827|   	nattrs = eh->nattrs;
#  828|-> 	nvals = eh->nvals;
#  829|   	x = entry_alloc();
#  830|   	x->e_attrs = attrs_alloc( nattrs );

Error: CPPCHECK_WARNING: [#def872]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/extended.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def873]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/extended.c: scope_hint: In function ‘fe_extended’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/extended.c:203:33: warning[-Wunused-but-set-variable]: variable ‘reqdata’ set but not used
#  203 |         struct berval           reqdata = BER_BVNULL;
#      |                                 ^~~~~~~
#  201|   {
#  202|   	struct extop_list	*ext = NULL;
#  203|-> 	struct berval		reqdata = BER_BVNULL;
#  204|   
#  205|   	if (op->ore_reqdata) {

Error: CLANG_WARNING: [#def874]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/extended.c:206:3: warning[deadcode.DeadStores]: Value stored to 'reqdata' is never read
#  204|   
#  205|   	if (op->ore_reqdata) {
#  206|-> 		reqdata = *op->ore_reqdata;
#  207|   	}
#  208|   

Error: CPPCHECK_WARNING: [#def875]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/filter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def876]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/filterentry.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def877]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/init.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def878]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/ldapsync.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def879]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/ldapsync.c:138:22: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'csnp')
#  136|   {
#  137|   	char *p, *q;
#  138|-> 	struct berval csn = *csnp;
#  139|   	int i;
#  140|   

Error: CLANG_WARNING: [#def880]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/ldapsync.c:313:10: warning[deadcode.DeadStores]: Value stored to 'sid_ptr' during its initialization is never read
#  311|   		}
#  312|   		if ( !strncmp( next, "sid=", STRLENOF("sid=") )) {
#  313|-> 			char *sid_ptr = next;
#  314|   			sid_ptr = next;
#  315|   			cookie->sid = strtol( &sid_ptr[ STRLENOF( "sid=" ) ], &next, 16 );

Error: CPPCHECK_WARNING: [#def881]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/limits.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def882]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/logging.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def883]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/logging.c: scope_hint: In function ‘slap_debug_print’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/logging.c:143:57: warning[-Wunused-value]: value computed is not used
#  143 |                                                         !write( 2, buf, len );
#      |                                                         ^~~~~~~~~~~~~~~~~~~~~
#  141|   							rc, AC_STRERROR_R( rc, ebuf, sizeof(ebuf) ));
#  142|   						if ( !logfile_only )
#  143|-> 							!write( 2, buf, len );
#  144|   						!write( logfile_fd, buf, len );
#  145|   						logfile_rotfail = 1;

Error: COMPILER_WARNING (CWE-563): [#def884]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/logging.c:144:49: warning[-Wunused-value]: value computed is not used
#  144 |                                                 !write( logfile_fd, buf, len );
#      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  142|   						if ( !logfile_only )
#  143|   							!write( 2, buf, len );
#  144|-> 						!write( logfile_fd, buf, len );
#  145|   						logfile_rotfail = 1;
#  146|   					}

Error: COMPILER_WARNING (CWE-563): [#def885]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/logging.c:161:57: warning[-Wunused-value]: value computed is not used
#  161 |                                                         !write( 2, buf, len );
#      |                                                         ^~~~~~~~~~~~~~~~~~~~~
#  159|   							rc, AC_STRERROR_R( rc, ebuf, sizeof(ebuf) ));
#  160|   						if ( !logfile_only )
#  161|-> 							!write( 2, buf, len );
#  162|   						!write( logfile_fd, buf, len );
#  163|   						logfile_openfail = 1;

Error: COMPILER_WARNING (CWE-563): [#def886]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/logging.c:162:49: warning[-Wunused-value]: value computed is not used
#  162 |                                                 !write( logfile_fd, buf, len );
#      |                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  160|   						if ( !logfile_only )
#  161|   							!write( 2, buf, len );
#  162|-> 						!write( logfile_fd, buf, len );
#  163|   						logfile_openfail = 1;
#  164|   					}

Error: GCC_ANALYZER_WARNING: [#def887]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/logging.c: scope_hint: In function ‘logfile_open’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/logging.c:260:17: warning[-Wanalyzer-overlapping-buffers]: overlapping buffers passed as arguments to ‘strcpy’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/string.h:21: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/logging.c:22: included_from: Included from here.
/usr/include/string.h:141:14: note: the behavior of ‘strcpy’ is undefined for overlapping buffers
#  258|   			goto fail;
#  259|   		}
#  260|-> 		strcpy( logfile_path, path );
#  261|   		strcpy( logpaths[0], path );
#  262|   		strcpy( logpaths[1], path );

Error: CLANG_WARNING: [#def888]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/logging.c:396:8: warning[core.NullDereference]: Array access (from variable 'arg') results in a null pointer dereference
#  394|   		int rc;
#  395|   
#  396|-> 		if ( arg[0] == '-' ) {
#  397|   			rc = lutil_atoix( &level, arg, 0 );
#  398|   		} else {

Error: CPPCHECK_WARNING: [#def889]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/main.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def890]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/main.c:246:8: warning[deadcode.DeadStores]: Value stored to 'serverNamePrefix' during its initialization is never read
#  244|   	struct sync_cookie *scp_entry = NULL;
#  245|   
#  246|-> 	char *serverNamePrefix = "";
#  247|   	size_t	l;
#  248|   

Error: COMPILER_WARNING (CWE-252): [#def891]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/main.c: scope_hint: In function ‘main’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/main.c:858:17: warning[-Wunused-result]: ignoring return value of ‘write’ declared with attribute ‘warn_unused_result’
#  858 |                 write( waitfds[1], "1", 1 );
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
#  856|   #ifndef HAVE_WINSOCK
#  857|   	if ( !no_detach ) {
#  858|-> 		write( waitfds[1], "1", 1 );
#  859|   		close( waitfds[1] );
#  860|   	}

Error: CPPCHECK_WARNING: [#def892]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/matchedValues.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def893]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modify.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def894]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modify.c:657:6: warning[core.CallAndMessage]: 5th function call argument is an uninitialized value
#  655|   				if ( rc == LDAP_TYPE_OR_VALUE_EXISTS ) {
#  656|   					/* value exists already */
#  657|-> 					snprintf( textbuf, textlen,
#  658|   						"%s: value #%d provided more than once",
#  659|   						ml->sml_desc->ad_cname.bv_val, i );

Error: COMPILER_WARNING (CWE-563): [#def895]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modify.c: scope_hint: In function ‘slap_mods_opattrs’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modify.c:874:41: warning[-Wunused-but-set-variable]: variable ‘modlast’ set but not used
#  874 |         Modifications *mod, **modtail, *modlast;
#      |                                         ^~~~~~~
#  872|   	char timebuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
#  873|   	char csnbuf[ LDAP_PVT_CSNSTR_BUFSIZE ];
#  874|-> 	Modifications *mod, **modtail, *modlast;
#  875|   	int gotcsn = 0, gotmname = 0, gotmtime = 0;
#  876|   

Error: CLANG_WARNING: [#def896]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modify.c:958:4: warning[deadcode.DeadStores]: Value stored to 'modlast' is never read
#  956|   			mod->sml_nvalues = NULL;
#  957|   			*modtail = mod;
#  958|-> 			modlast = mod;
#  959|   			modtail = &mod->sml_next;
#  960|   		}

Error: CLANG_WARNING: [#def897]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modify.c:997:4: warning[deadcode.DeadStores]: Value stored to 'modtail' is never read
#  995|   			mod->sml_nvalues = NULL;
#  996|   			*modtail = mod;
#  997|-> 			modtail = &mod->sml_next;
#  998|   		}
#  999|   	}

Error: CPPCHECK_WARNING: [#def898]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modrdn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-562): [#def899]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modrdn.c:354: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  352|   						op->o_req_dn = pdn;
#  353|   						op->o_req_ndn = pdn;
#  354|-> 						op->o_callback = &cb;
#  355|   						op->o_bd->be_delete( op, rs );
#  356|   					} else {

Error: CLANG_WARNING: [#def900]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modrdn.c:513:20: warning[core.NullDereference]: Array access (from variable 'old_rdn') results in a null pointer dereference
#  511|   	/* Remove old rdn value if required */
#  512|   	if ( op->orr_deleteoldrdn ) {
#  513|-> 		for ( d_cnt = 0; old_rdn[d_cnt]; d_cnt++ ) {
#  514|   			AttributeDescription	*desc = NULL;
#  515|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def901]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modrdn.c: scope_hint: In function ‘slap_modrdn2mods’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modrdn.c:513:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modrdn.c:34: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:54: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modrdn.c:41: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modrdn.c:452:14: note: in expansion of macro ‘BER_BVISEMPTY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/modrdn.c:512:18: note: in expansion of macro ‘orr_deleteoldrdn’
#  511|   	/* Remove old rdn value if required */
#  512|   	if ( op->orr_deleteoldrdn ) {
#  513|-> 		for ( d_cnt = 0; old_rdn[d_cnt]; d_cnt++ ) {
#  514|   			AttributeDescription	*desc = NULL;
#  515|   

Error: CPPCHECK_WARNING: [#def902]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/mods.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def903]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/mods.c:55:3: warning[deadcode.DeadStores]: Value stored to 'op' is never read
#   53|   		break;
#   54|   	default:
#   55|-> 		op = "?";
#   56|   		assert( 0 );
#   57|   	}

Error: CPPCHECK_WARNING: [#def904]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/module.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def905]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/mr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def906]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/mra.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def907]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/mra.c:152:5: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  150|   			if( rc != LDAP_SUCCESS ) {
#  151|   				ma.ma_desc = slap_bv2tmp_ad( &type, op->o_tmpmemctx );
#  152|-> 				rc = LDAP_SUCCESS;
#  153|   			}
#  154|   		}

Error: CPPCHECK_WARNING: [#def908]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/oc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def909]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/oidm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def910]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def911]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:112:34: warning[-Wmissing-braces]: missing braces around initializer
#  112 | static ConfigTable log_cfats[] = {
#      |                                  ^
#  110|   };
#  111|   
#  112|-> static ConfigTable log_cfats[] = {
#  113|   	{ "logdb", "suffix", 2, 2, 0, ARG_DN|ARG_QUOTE|ARG_MAGIC|LOG_DB,
#  114|   		log_cf_gen, "( OLcfgOvAt:4.1 NAME 'olcAccessLogDB' "

Error: CLANG_WARNING: [#def912]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:617:3: warning[deadcode.DeadStores]: Value stored to 'size' is never read
#  615|   		len = snprintf( ptr, size, ":%02d", ss );
#  616|   		assert( len >= 0 && (unsigned) len < size );
#  617|-> 		size -= len;
#  618|   		ptr += len;
#  619|   	}

Error: COMPILER_WARNING (CWE-563): [#def913]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘accesslog_purge’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:705:14: warning[-Wunused-variable]: unused variable ‘csnbuf’
#  705 |         char csnbuf[LDAP_PVT_CSNSTR_BUFSIZE];
#      |              ^~~~~~
#  703|   	purge_data pd = { .li = li };
#  704|   	char timebuf[LDAP_LUTIL_GENTIME_BUFSIZE];
#  705|-> 	char csnbuf[LDAP_PVT_CSNSTR_BUFSIZE];
#  706|   	time_t old = slap_get_time();
#  707|   

Error: CLANG_WARNING: [#def914]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:1324:3: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read
# 1322|   		ptr = noid.bv_val = ber_memalloc_x( noid.bv_len + 1, memctx );
# 1323|   		ptr = lutil_strcopy( ptr, idx.bv_val );
# 1324|-> 		ptr = lutil_strcopy( ptr, oid.bv_val );
# 1325|   
# 1326|   		bv.bv_len = idx.bv_len + STRLENOF( "{}" ) + oid.bv_len;

Error: COMPILER_WARNING (CWE-1164): [#def915]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘accesslog_response’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:2027:1: warning[-Wunused-label]: label ‘done’ defined but not used
# 2027 | done:
#      | ^~~~
# 2025|   	}
# 2026|   
# 2027|-> done:
# 2028|   	ldap_pvt_thread_mutex_unlock( &li->li_log_mutex );
# 2029|   	if ( old ) entry_free( old );

Error: COMPILER_WARNING (CWE-563): [#def916]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘accesslog_op_mod’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:2114:21: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
# 2114 |                 int rc;
#      |                     ^~
# 2112|   		( op->o_tag == LDAP_REQ_MODRDN && li->li_oldattrs )))
# 2113|   	{
# 2114|-> 		int rc;
# 2115|   		Entry *e;
# 2116|   

Error: CLANG_WARNING: [#def917]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:2118:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 2116|   
# 2117|   		op->o_bd->bd_info = (BackendInfo *)on->on_info;
# 2118|-> 		rc = be_entry_get_rw( op, &op->o_req_ndn, NULL, NULL, 0, &e );
# 2119|   		if ( e ) {
# 2120|   			if ( test_filter( op, e, li->li_oldf ) == LDAP_COMPARE_TRUE )

Error: COMPILER_WARNING (CWE-563): [#def918]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:2127:21: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
# 2127 |                 int rc;
#      |                     ^~
# 2125|   
# 2126|   	} else {
# 2127|-> 		int rc;
# 2128|   		Entry *e;
# 2129|   

Error: CLANG_WARNING: [#def919]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:2131:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 2129|   
# 2130|   		op->o_bd->bd_info = (BackendInfo *)on->on_info;
# 2131|-> 		rc = be_entry_get_rw( op, &op->o_req_ndn, NULL, NULL, 0, &e );
# 2132|   		if ( e ) {
# 2133|   			Attribute *a = attr_find( e->e_attrs, slap_schema.si_ad_entryUUID );

Error: COMPILER_WARNING (CWE-563): [#def920]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘accesslog_db_root’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:2399:13: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
# 2399 |         int rc;
#      |             ^~
# 2397|   
# 2398|   	Entry *e;
# 2399|-> 	int rc;
# 2400|   
# 2401|   	ldap_pvt_thread_mutex_lock( &li->li_log_mutex );

Error: CLANG_WARNING: [#def921]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:2407:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 2405|   	op->o_dn = li->li_db->be_rootdn;
# 2406|   	op->o_ndn = li->li_db->be_rootndn;
# 2407|-> 	rc = be_entry_get_rw( op, li->li_db->be_nsuffix, NULL, NULL, 0, &e );
# 2408|   
# 2409|   	if ( e ) {

Error: CLANG_WARNING: [#def922]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:2441:5: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 2439|   				op->orm_modlist = &mod;
# 2440|   				op->orm_no_opattrs = 1;
# 2441|-> 				rc = op->o_bd->be_modify( op, &rs );
# 2442|   			}
# 2443|   		}

Error: CLANG_WARNING: [#def923]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:2487:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 2485|   		/* Get contextCSN from main DB */
# 2486|   		op->o_bd = on->on_info->oi_origdb;
# 2487|-> 		rc = be_entry_get_rw( op, op->o_bd->be_nsuffix, NULL,
# 2488|   			slap_schema.si_ad_contextCSN, 0, &e_ctx );
# 2489|   

Error: CLANG_WARNING: [#def924]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:2519:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 2517|   		op->o_callback = &nullsc;
# 2518|   		SLAP_DBFLAGS( op->o_bd ) |= SLAP_DBFLAG_NOLASTMOD;
# 2519|-> 		rc = op->o_bd->be_add( op, &rs );
# 2520|   		if ( rs.sr_err != LDAP_SUCCESS ) {
# 2521|   			Debug( LDAP_DEBUG_SYNC, "%s accesslog_db_root: "

Error: COMPILER_WARNING (CWE-563): [#def925]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:2631:26: warning[-Wunused-variable]: unused variable ‘c2’
# 2631 |         int part, c, c1, c2, tzoffset, leapyear = 0;
#      |                          ^~
# 2629|   	};
# 2630|   	char *p, *e;
# 2631|-> 	int part, c, c1, c2, tzoffset, leapyear = 0;
# 2632|   
# 2633|   	p = val->bv_val;

Error: COMPILER_WARNING (CWE-563): [#def926]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c: scope_hint: In function ‘check_rdntime_syntax’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/accesslog.c:2682:31: warning[-Wunused-variable]: unused variable ‘end_num’
# 2682 |                         char *end_num;
#      |                               ^~~~~~~
# 2680|   		fraction->bv_len = 0;
# 2681|   		if (p < e && (*p == '.' || *p == ',')) {
# 2682|-> 			char *end_num;
# 2683|   			while (++p < e && ASCII_DIGIT(*p)) {
# 2684|   				/* EMPTY */;

Error: CPPCHECK_WARNING: [#def927]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/auditlog.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def928]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/auditlog.c:40:36: warning[-Wmissing-braces]: missing braces around initializer
#   40 | static ConfigTable auditlogcfg[] = {
#      |                                    ^
#   38|   } auditlog_data;
#   39|   
#   40|-> static ConfigTable auditlogcfg[] = {
#   41|   	{ "auditlog", "filename", 2, 2, 0,
#   42|   	  ARG_STRING|ARG_OFFSET,

Error: CPPCHECK_WARNING: [#def929]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/autoca.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def930]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/autoca.c:47:9: warning: "X509_get_notBefore" redefined
#   47 | #define X509_get_notBefore(x)   X509_getm_notBefore(x)
#      |         ^~~~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/autoca.c:35: included_from: Included from here.
/usr/include/openssl/x509.h:859:11: note: this is the location of the previous definition
#  859 | #  define X509_get_notBefore X509_getm_notBefore
#      |           ^~~~~~~~~~~~~~~~~~
#   45|   #if OPENSSL_VERSION_NUMBER >= 0x10100000
#   46|   #include <openssl/rsa.h>
#   47|-> #define X509_get_notBefore(x)	X509_getm_notBefore(x)
#   48|   #define X509_get_notAfter(x)	X509_getm_notAfter(x)
#   49|   #endif

Error: COMPILER_WARNING: [#def931]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/autoca.c:48:9: warning: "X509_get_notAfter" redefined
#   48 | #define X509_get_notAfter(x)    X509_getm_notAfter(x)
#      |         ^~~~~~~~~~~~~~~~~
/usr/include/openssl/x509.h:860:11: note: this is the location of the previous definition
#  860 | #  define X509_get_notAfter X509_getm_notAfter
#      |           ^~~~~~~~~~~~~~~~~
#   46|   #include <openssl/rsa.h>
#   47|   #define X509_get_notBefore(x)	X509_getm_notBefore(x)
#   48|-> #define X509_get_notAfter(x)	X509_getm_notAfter(x)
#   49|   #endif
#   50|   

Error: CPPCHECK_WARNING (CWE-562): [#def932]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/autoca.c:452: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  450|   	op->o_bd->bd_info = args->on->on_info->oi_orig;
#  451|   	op->o_tag = LDAP_REQ_MODIFY;
#  452|-> 	op->o_callback = &cb;
#  453|   	op->orm_modlist = mod;
#  454|   	op->orm_no_opattrs = 1;

Error: CPPCHECK_WARNING (CWE-562): [#def933]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/autoca.c:561: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  559|   
#  560|   	op->o_tag = LDAP_REQ_MODIFY;
#  561|-> 	op->o_callback = &cb;
#  562|   	op->orm_modlist = mod;
#  563|   	op->orm_no_opattrs = 1;

Error: COMPILER_WARNING (CWE-665): [#def934]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/autoca.c:728:35: warning[-Wmissing-braces]: missing braces around initializer
#  728 | static ConfigTable autoca_cfg[] = {
#      |                                   ^
#  726|   }
#  727|   
#  728|-> static ConfigTable autoca_cfg[] = {
#  729|   	{ "userClass", "objectclass", 2, 2, 0,
#  730|   	  ARG_STRING|ARG_MAGIC|ACA_USRCLASS, autoca_cf,

Error: CLANG_WARNING: [#def935]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/autoca.c:1011:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1009|   	op->o_dn = be->be_rootdn;
# 1010|   	op->o_ndn = be->be_rootndn;
# 1011|-> 	rc = overlay_entry_get_ov( op, be->be_nsuffix, NULL, 
# 1012|   		NULL, 0, &e, on );
# 1013|   

Error: CPPCHECK_WARNING: [#def936]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/collect.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def937]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/collect.c:54:35: warning[-Wmissing-braces]: missing braces around initializer
#   54 | static ConfigTable collectcfg[] = {
#      |                                   ^
#   52|   static int collect_cf( ConfigArgs *c );
#   53|   
#   54|-> static ConfigTable collectcfg[] = {
#   55|   	{ "collectinfo", "dn> <attribute", 3, 3, 0,
#   56|   	  ARG_MAGIC, collect_cf,

Error: CPPCHECK_WARNING (CWE-562): [#def938]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/collect.c:344: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  342|   						"cannot change virtual attribute '%s'",
#  343|   						ci->ci_ad[idx]->ad_cname.bv_val);
#  344|-> 					rs->sr_text = errMsg;
#  345|   					send_ldap_result( op, rs );
#  346|   					return rs->sr_err;

Error: COMPILER_WARNING (CWE-563): [#def939]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/collect.c: scope_hint: In function ‘collect_response’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/collect.c:366:21: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
#  366 |                 int rc;
#      |                     ^~
#  364|   	 */
#  365|   	if ( ci && rs->sr_type == REP_SEARCH ) {
#  366|-> 		int rc;
#  367|   
#  368|   		op->o_bd->bd_info = (BackendInfo *)on->on_info;

Error: CLANG_WARNING: [#def940]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/collect.c:397:5: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  395|   				/* Extract the values of the desired attribute from
#  396|   			 	 * the ancestor entry */
#  397|-> 				rc = backend_attribute( op, NULL, &ci->ci_dn, 
#  398|   					ci->ci_ad[idx], &vals, ACL_READ );
#  399|   

Error: CPPCHECK_WARNING: [#def941]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def942]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c:90:38: warning[-Wmissing-braces]: missing braces around initializer
#   90 | static ConfigTable constraintcfg[] = {
#      |                                      ^
#   88|   static ConfigDriver constraint_cf_gen;
#   89|   
#   90|-> static ConfigTable constraintcfg[] = {
#   91|   	{ "constraint_attribute", "attribute[list]> (regex|negregex|uri|set|size|count) <value> [<restrict URI>]",
#   92|   	  4, 0, 0, ARG_MAGIC | CONSTRAINT_ATTRIBUTE, constraint_cf_gen,

Error: CLANG_WARNING: [#def943]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c:216:28: warning[core.NullDereference]: Dereference of null pointer
#  214|   				s = bv.bv_val = ch_malloc(bv.bv_len + 1);
#  215|   
#  216|-> 				s = lutil_strncopy( s, cp->ap[0]->ad_cname.bv_val, cp->ap[0]->ad_cname.bv_len );
#  217|   				for (j = 1; cp->ap[j]; j++) {
#  218|   					*s++ = ',';

Error: COMPILER_WARNING: [#def944]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c: scope_hint: In function ‘constraint_cf_gen’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c:319:98: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 1023 bytes into a region of size 216
#  319 |                                                 "%s %s: Illegal regular expression \"%s\": Error %s",
#      |                                                                                                  ^~
#  320 |                                                 c->argv[0], c->argv[1], c->argv[3], errmsg);
#      |                                                                                     ~~~~~~        
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output 41 or more bytes (assuming 1064) into a destination of size 256
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  317|   					ch_free(ap.re);
#  318|   					snprintf( c->cr_msg, sizeof( c->cr_msg ),
#  319|-> 						"%s %s: Illegal regular expression \"%s\": Error %s",
#  320|   						c->argv[0], c->argv[1], c->argv[3], errmsg);
#  321|   					ap.re = NULL;

Error: COMPILER_WARNING (CWE-563): [#def945]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c: scope_hint: In function ‘constraint_cf_gen’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c:327:40: warning[-Wunused-variable]: unused variable ‘size’
#  327 |                                 size_t size;
#      |                                        ^~~~
#  325|   				ber_str2bv( c->argv[3], 0, 1, &ap.val );
#  326|   			} else if ( strcasecmp( c->argv[2], SIZE_STR ) == 0 ) {
#  327|-> 				size_t size;
#  328|   				char *endptr;
#  329|   

Error: COMPILER_WARNING (CWE-563): [#def946]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c:335:40: warning[-Wunused-variable]: unused variable ‘count’
#  335 |                                 size_t count;
#      |                                        ^~~~~
#  333|   					rc = ARG_BAD_CONF;
#  334|   			} else if ( strcasecmp( c->argv[2], COUNT_STR ) == 0 ) {
#  335|-> 				size_t count;
#  336|   				char *endptr;
#  337|   

Error: COMPILER_WARNING (CWE-563): [#def947]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c: scope_hint: In function ‘constraint_check_count_violation’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c:892:19: warning[-Wunused-variable]: unused variable ‘b’
#  892 |         BerVarray b = NULL;
#      |                   ^
#  890|   constraint_check_count_violation( Modifications *m, Entry *target_entry, constraint *cp )
#  891|   {
#  892|-> 	BerVarray b = NULL;
#  893|   	unsigned ce = 0;
#  894|   	unsigned ca;

Error: CLANG_WARNING: [#def948]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c:989:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  987|   
#  988|   	op->o_bd = on->on_info->oi_origdb;
#  989|-> 	rc = be_entry_get_rw( op, &op->o_req_ndn, NULL, NULL, 0, &target_entry );
#  990|   	op->o_bd = be;
#  991|   

Error: CLANG_WARNING: [#def949]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c:1015:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1013|   	}
# 1014|   
# 1015|-> 	rc = LDAP_CONSTRAINT_VIOLATION;
# 1016|   	for(;m; m = m->sml_next) {
# 1017|   		unsigned ce = 0;

Error: COMPILER_WARNING (CWE-563): [#def950]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c: scope_hint: In function ‘constraint_update’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/constraint.c:1017:26: warning[-Wunused-variable]: unused variable ‘ce’
# 1017 |                 unsigned ce = 0;
#      |                          ^~
# 1015|   	rc = LDAP_CONSTRAINT_VIOLATION;
# 1016|   	for(;m; m = m->sml_next) {
# 1017|-> 		unsigned ce = 0;
# 1018|   
# 1019|   		if (is_at_operational( m->sml_desc->ad_type )) continue;

Error: CPPCHECK_WARNING: [#def951]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dds.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def952]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dds.c:1240:32: warning[-Wmissing-braces]: missing braces around initializer
# 1240 | static ConfigTable dds_cfg[] = {
#      |                                ^
# 1238|   #endif
# 1239|   
# 1240|-> static ConfigTable dds_cfg[] = {
# 1241|   	{ "dds-state", "on|off",
# 1242|   		2, 2, 0, ARG_MAGIC|ARG_ON_OFF|DDS_STATE, dds_cfgen,

Error: CPPCHECK_WARNING: [#def953]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/deref.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def954]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/deref.c:419:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  417|   		ber_set_option( ber, LBER_OPT_BER_MEMCTX, &op->o_tmpmemctx );
#  418|   
#  419|-> 		rc = ber_printf( ber, "{" /*}*/ );
#  420|   		for ( dr = drhead; dr != NULL; dr = dr->dr_next ) {
#  421|   			for ( i = 0; !BER_BVISNULL( &dr->dr_vals[ i ].dv_derefSpecVal ); i++ ) {

Error: CLANG_WARNING: [#def955]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/deref.c:428:5: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  426|   				}
#  427|   
#  428|-> 				rc = ber_printf( ber, "{OO" /*}*/,
#  429|   					&dr->dr_spec.ds_derefAttr->ad_cname,
#  430|   					&dr->dr_vals[ i ].dv_derefSpecVal );

Error: CLANG_WARNING: [#def956]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/deref.c:435:8: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  433|   					if ( dr->dr_vals[ i ].dv_attrVals[ j ] != NULL ) {
#  434|   						if ( first ) {
#  435|-> 							rc = ber_printf( ber, "t{" /*}*/,
#  436|   								(LBER_CONSTRUCTED|LBER_CLASS_CONTEXT) );
#  437|   							first = 0;

Error: CLANG_WARNING: [#def957]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/deref.c:439:7: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  437|   							first = 0;
#  438|   						}
#  439|-> 						rc = ber_printf( ber, "{O[W]}",
#  440|   							&dr->dr_spec.ds_attributes[ j ]->ad_cname,
#  441|   							dr->dr_vals[ i ].dv_attrVals[ j ] );

Error: CLANG_WARNING: [#def958]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/deref.c:447:6: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  445|   				}
#  446|   				if ( !first ) {
#  447|-> 					rc = ber_printf( ber, /*{{*/ "}N}" );
#  448|   				} else {
#  449|   					rc = ber_printf( ber, /*{*/ "}" );

Error: CLANG_WARNING: [#def959]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/deref.c:449:6: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  447|   					rc = ber_printf( ber, /*{{*/ "}N}" );
#  448|   				} else {
#  449|-> 					rc = ber_printf( ber, /*{*/ "}" );
#  450|   				}
#  451|   			}

Error: CLANG_WARNING: [#def960]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/deref.c:453:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  451|   			}
#  452|   		}
#  453|-> 		rc = ber_printf( ber, /*{*/ "}" );
#  454|   		if ( ber_flatten2( ber, &ctrlval, 0 ) == -1 ) {
#  455|   			if ( op->o_deref == SLAP_CONTROL_CRITICAL ) {

Error: CPPCHECK_WARNING (CWE-457): [#def961]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dyngroup.c:85: warning[uninitvar]: Uninitialized variable: ap
#   83|   				ap = *app;
#   84|   			}
#   85|-> 			*app = ap->ap_next;
#   86|   			ch_free( ap );
#   87|   		}

Error: CLANG_WARNING: [#def962]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dyngroup.c:85:11: warning[core.NullDereference]: Access to field 'ap_next' results in a dereference of an undefined pointer value (loaded from variable 'ap')
#   83|   				ap = *app;
#   84|   			}
#   85|-> 			*app = ap->ap_next;
#   86|   			ch_free( ap );
#   87|   		}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def963]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dyngroup.c: scope_hint: In function ‘dgroup_cf’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dyngroup.c:85:34: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ap’
#   83|   				ap = *app;
#   84|   			}
#   85|-> 			*app = ap->ap_next;
#   86|   			ch_free( ap );
#   87|   		}

Error: COMPILER_WARNING (CWE-457): [#def964]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dyngroup.c: scope_hint: In function ‘dgroup_cf’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dyngroup.c:85:34: warning[-Wmaybe-uninitialized]: ‘ap’ may be used uninitialized
#   85 |                         *app = ap->ap_next;
#      |                                ~~^~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dyngroup.c:79:40: note: ‘ap’ was declared here
#   79 |                         adpair **app, *ap;
#      |                                        ^~
#   83|   				ap = *app;
#   84|   			}
#   85|-> 			*app = ap->ap_next;
#   86|   			ch_free( ap );
#   87|   		}

Error: COMPILER_WARNING (CWE-665): [#def965]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dyngroup.c:127:34: warning[-Wmissing-braces]: missing braces around initializer
#  127 | static ConfigTable dgroupcfg[] = {
#      |                                  ^
#  125|   }
#  126|   
#  127|-> static ConfigTable dgroupcfg[] = {
#  128|   	{ "attrpair", "member-attribute> <URL-attribute", 3, 3, 0,
#  129|   	  ARG_MAGIC, dgroup_cf,

Error: COMPILER_WARNING (CWE-457): [#def966]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dynlist.c: scope_hint: In function ‘dynlist_filter_dup’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dynlist.c:1421:17: warning[-Wmaybe-uninitialized]: ‘n’ may be used uninitialized
# 1421 |         Filter *n;
#      |                 ^
# 1419|   dynlist_filter_dup( Operation *op, Filter *f, AttributeDescription *ad, dynlist_search_t *ds )
# 1420|   {
# 1421|-> 	Filter *n;
# 1422|   
# 1423|   	if ( !f )

Error: CLANG_WARNING: [#def967]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dynlist.c:1467:2: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
# 1465|   		break;
# 1466|   	}
# 1467|-> 	return n;
# 1468|   }
# 1469|   

Error: CLANG_WARNING: [#def968]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dynlist.c:1957:13: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
# 1955|   								want |= WANT_MEMBER;
# 1956|   						} else {
# 1957|-> 							if ( opattrs ) {
# 1958|   								if ( dlm->dlm_memberOf_oper ) {
# 1959|   									want |= WANT_MEMBEROF;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def969]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dynlist.c: scope_hint: In function ‘dynlist_search’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dynlist.c:1957:60: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘opattrs’
# 1955|   								want |= WANT_MEMBER;
# 1956|   						} else {
# 1957|-> 							if ( opattrs ) {
# 1958|   								if ( dlm->dlm_memberOf_oper ) {
# 1959|   									want |= WANT_MEMBEROF;

Error: COMPILER_WARNING (CWE-457): [#def970]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dynlist.c: scope_hint: In function ‘dynlist_search’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dynlist.c:1957:60: warning[-Wmaybe-uninitialized]: ‘opattrs’ may be used uninitialized
# 1957 |                                                         if ( opattrs ) {
#      |                                                            ^
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dynlist.c:1882:13: note: ‘opattrs’ was declared here
# 1882 |         int opattrs, userattrs;
#      |             ^~~~~~~
# 1955|   								want |= WANT_MEMBER;
# 1956|   						} else {
# 1957|-> 							if ( opattrs ) {
# 1958|   								if ( dlm->dlm_memberOf_oper ) {
# 1959|   									want |= WANT_MEMBEROF;

Error: COMPILER_WARNING (CWE-457): [#def971]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dynlist.c:1964:60: warning[-Wmaybe-uninitialized]: ‘userattrs’ may be used uninitialized
# 1964 |                                                         if ( userattrs ) {
#      |                                                            ^
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dynlist.c:1882:22: note: ‘userattrs’ was declared here
# 1882 |         int opattrs, userattrs;
#      |                      ^~~~~~~~~
# 1962|   								}
# 1963|   							}
# 1964|-> 							if ( userattrs ) {
# 1965|   								if ( !dlm->dlm_memberOf_oper ) {
# 1966|   									want |= WANT_MEMBEROF;

Error: COMPILER_WARNING (CWE-665): [#def972]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dynlist.c:2139:30: warning[-Wmissing-braces]: missing braces around initializer
# 2139 | static ConfigTable dlcfg[] = {
#      |                              ^
# 2137|   
# 2138|   /* XXXmanu 255 is the maximum arguments we allow. Can we go beyond? */
# 2139|-> static ConfigTable dlcfg[] = {
# 2140|   	{ "dynlist-attrset", "group-oc> [uri] <URL-ad> <[mapped:]member-ad> [...]",
# 2141|   		3, 0, 0, ARG_MAGIC|DL_ATTRSET, dl_cfgen,

Error: CLANG_WARNING: [#def973]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/dynlist.c:2341:5: warning[deadcode.DeadStores]: Value stored to 'dli' is never read
# 2339|   				ch_free( dli );
# 2340|   
# 2341|-> 				dli = (dynlist_info_t *)dlg->dlg_dli;
# 2342|   			}
# 2343|   			break;

Error: CPPCHECK_WARNING: [#def974]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def975]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c:152:35: warning[-Wmissing-braces]: missing braces around initializer
#  152 | static ConfigTable homedircfg[] = {
#      |                                   ^
#  150|   static slap_overinst homedir;
#  151|   
#  152|-> static ConfigTable homedircfg[] = {
#  153|   	{ "homedir-skeleton-path", "pathname", 2, 2, 0,
#  154|   		ARG_STRING|ARG_OFFSET,

Error: COMPILER_WARNING: [#def976]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c: scope_hint: In function ‘traverse_tar_pre’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c:1292:17: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 100 equals destination size
# 1292 |                 strncpy( tar->name, ch + 1, 100 );
#      |                 ^
# 1290|   			ch = name + name_len - 100;
# 1291|   		}
# 1292|-> 		strncpy( tar->name, ch + 1, 100 );
# 1293|   		{
# 1294|   			int prefix_len = ( ch - 1 ) - name;

Error: COMPILER_WARNING: [#def977]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c:1301:33: warning[-Wformat-truncation=]: ‘%06lo’ directive output may be truncated writing between 6 and 11 bytes into a region of size 8
# 1301 |         snprintf( tar->uid, 8, "%06lo ", (long)st->st_uid );
#      |                                 ^~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c:1301:32: note: directive argument in the range [0, 4294967295]
# 1301 |         snprintf( tar->uid, 8, "%06lo ", (long)st->st_uid );
#      |                                ^~~~~~~~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 8 and 13 bytes into a destination of size 8
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
# 1299|   
# 1300|   	snprintf( tar->mode, 8, "%06lo ", (long)st->st_mode & 07777 );
# 1301|-> 	snprintf( tar->uid, 8, "%06lo ", (long)st->st_uid );
# 1302|   	snprintf( tar->gid, 8, "%06lo ", (long)st->st_gid );
# 1303|   	snprintf( tar->mtime, 12, "%010lo ", (long)st->st_mtime );

Error: COMPILER_WARNING: [#def978]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c: scope_hint: In function ‘traverse_tar_pre’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c:1302:33: warning[-Wformat-truncation=]: ‘%06lo’ directive output may be truncated writing between 6 and 11 bytes into a region of size 8
# 1302 |         snprintf( tar->gid, 8, "%06lo ", (long)st->st_gid );
#      |                                 ^~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c:1302:32: note: directive argument in the range [0, 4294967295]
# 1302 |         snprintf( tar->gid, 8, "%06lo ", (long)st->st_gid );
#      |                                ^~~~~~~~
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 8 and 13 bytes into a destination of size 8
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
# 1300|   	snprintf( tar->mode, 8, "%06lo ", (long)st->st_mode & 07777 );
# 1301|   	snprintf( tar->uid, 8, "%06lo ", (long)st->st_uid );
# 1302|-> 	snprintf( tar->gid, 8, "%06lo ", (long)st->st_gid );
# 1303|   	snprintf( tar->mtime, 12, "%010lo ", (long)st->st_mtime );
# 1304|   	snprintf( tar->size, 12, "%010lo ", (long)0 );

Error: CLANG_WARNING: [#def979]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c:1553:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1551|   			/* fall-through */
# 1552|   		case DEL_DELETE:
# 1553|-> 			rc = delete_tree( path, ctx );
# 1554|   			break;
# 1555|   		default:

Error: CPPCHECK_WARNING (CWE-457): [#def980]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c:1855: error[legacyUninitvar]: Uninitialized variable: new_presence
# 1853|   
# 1854|   			} else if ( old_valid && !new_valid &&
# 1855|-> 					!new_presence ) { /* like a del */
# 1856|   				Debug( LDAP_DEBUG_TRACE, "homedir: "
# 1857|   						"homedir_mod_response: treating like a del\n" );

Error: CLANG_WARNING: [#def981]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c:1855:6: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
# 1853|   
# 1854|   			} else if ( old_valid && !new_valid &&
# 1855|-> 					!new_presence ) { /* like a del */
# 1856|   				Debug( LDAP_DEBUG_TRACE, "homedir: "
# 1857|   						"homedir_mod_response: treating like a del\n" );

Error: CLANG_WARNING: [#def982]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c:1880:32: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
# 1878|   							"homedir_mod_response: nothing to do\n" );
# 1879|   				}
# 1880|-> 			} else if ( old_presence || new_presence ) {
# 1881|   				Debug( LDAP_DEBUG_ANY, "homedir: "
# 1882|   						"homedir_mod_response: <%s> values present "

Error: COMPILER_WARNING (CWE-457): [#def983]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c: scope_hint: In function ‘homedir_mod_response’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c:1880:50: warning[-Wmaybe-uninitialized]: ‘new_presence’ may be used uninitialized
# 1880 |                         } else if ( old_presence || new_presence ) {
#      |                                                  ^~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/homedir.c:1810:43: note: ‘new_presence’ declared here
# 1810 |                         int old_presence, new_presence;
#      |                                           ^~~~~~~~~~~~
# 1878|   							"homedir_mod_response: nothing to do\n" );
# 1879|   				}
# 1880|-> 			} else if ( old_presence || new_presence ) {
# 1881|   				Debug( LDAP_DEBUG_ANY, "homedir: "
# 1882|   						"homedir_mod_response: <%s> values present "

Error: CPPCHECK_WARNING: [#def984]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/memberof.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def985]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/memberof.c:747:32: warning[core.NullDereference]: Access to field 'a_nvals' results in a dereference of a null pointer (loaded from variable 'a')
#  745|   		AccessControlState	acl_state = ACL_STATE_INIT;
#  746|   
#  747|-> 		for ( i = 0; !BER_BVISNULL( &a->a_nvals[ i ] ); i++ ) {
#  748|   			Entry		*e;
#  749|   

Error: CLANG_WARNING: [#def986]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/memberof.c:1083:7: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1081|   							&acl_state );
# 1082|   					if ( rc == 0 ) {
# 1083|-> 						rc = rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
# 1084|   						rs->sr_text = NULL;
# 1085|   						send_ldap_result( op, rs );

Error: CLANG_WARNING: [#def987]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/memberof.c:1098:8: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1096|   
# 1097|   						if ( MEMBEROF_DANGLING_ERROR( mo ) ) {
# 1098|-> 							rc = rs->sr_err = mo->mo_dangling_err;
# 1099|   							rs->sr_text = "deleting non-existing object "
# 1100|   								"as memberof";

Error: CLANG_WARNING: [#def988]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/memberof.c:1173:5: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1171|   			op->o_bd->bd_info = (BackendInfo *)on;
# 1172|   			if ( rc == 0 ) {
# 1173|-> 				rc = rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
# 1174|   				rs->sr_text = NULL;
# 1175|   				send_ldap_result( op, rs );

Error: CLANG_WARNING: [#def989]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/memberof.c:1201:6: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1199|   						&acl_state );
# 1200|   				if ( rc == 0 ) {
# 1201|-> 					rc = rs->sr_err = LDAP_INSUFFICIENT_ACCESS;
# 1202|   					rs->sr_text = NULL;
# 1203|   					send_ldap_result( op, rs );

Error: CLANG_WARNING: [#def990]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/memberof.c:1216:7: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1214|   				if ( rc != LDAP_SUCCESS ) {
# 1215|   					if ( MEMBEROF_DANGLING_ERROR( mo ) ) {
# 1216|-> 						rc = rs->sr_err = mo->mo_dangling_err;
# 1217|   						rs->sr_text = "adding non-existing object "
# 1218|   							"as memberof";

Error: CLANG_WARNING: [#def991]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/memberof.c:1304:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 1302|   		op->o_ndn = op->o_bd->be_rootndn;
# 1303|   		op->o_bd->bd_info = (BackendInfo *)on->on_info;
# 1304|-> 		rc = backend_attribute( op, NULL, &op->o_req_ndn,
# 1305|   				mo->mo_ad_member, &mci->member, ACL_READ );
# 1306|   		op->o_bd->bd_info = (BackendInfo *)on;

Error: COMPILER_WARNING (CWE-665): [#def992]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/memberof.c:1758:31: warning[-Wmissing-braces]: missing braces around initializer
# 1758 | static ConfigTable mo_cfg[] = {
#      |                               ^
# 1756|   
# 1757|   
# 1758|-> static ConfigTable mo_cfg[] = {
# 1759|   	{ "memberof-dn", "modifiersName",
# 1760|   		2, 2, 0, ARG_MAGIC|ARG_QUOTE|ARG_DN|MO_DN, mo_cf_gen,

Error: CLANG_WARNING: [#def993]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/memberof.c:1913:2: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read
# 1911|   	*ptr++ = '(';
# 1912|   	ptr = lutil_strcopy( ptr, mo->mo_ad_memberof->ad_cname.bv_val );
# 1913|-> 	ptr = lutil_strcopy( ptr, "=*)" );
# 1914|   
# 1915|   	return 0;

Error: COMPILER_WARNING (CWE-563): [#def994]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/memberof.c: scope_hint: In function ‘memberof_db_open’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/memberof.c:2185:25: warning[-Wunused-variable]: unused variable ‘rc’
# 2185 |         int             rc;
#      |                         ^~
# 2183|   	memberof_t	*mo = (memberof_t *)on->on_bi.bi_private;
# 2184|   	
# 2185|-> 	int		rc;
# 2186|   
# 2187|   	if ( !mo->mo_ad_memberof ) {

Error: CPPCHECK_WARNING: [#def995]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/nestgroup.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def996]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/nestgroup.c:211:34: warning[-Wmissing-braces]: missing braces around initializer
#  211 | static ConfigTable ngroupcfg[] = {
#      |                                  ^
#  209|   }
#  210|   
#  211|-> static ConfigTable ngroupcfg[] = {
#  212|   	{ "nestgroup-member", "member-ad", 2, 2, 0,
#  213|   	  ARG_MAGIC|ARG_ATDESC|NG_MEMBER, ngroup_cf,

Error: COMPILER_WARNING (CWE-563): [#def997]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/nestgroup.c: scope_hint: In function ‘nestgroup_memberFilter’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/nestgroup.c:428:29: warning[-Wunused-variable]: unused variable ‘j’
#  428 |                         int j;
#      |                             ^
#  426|   		nestgroup_get_parentDNs( &o, &mbr_f[i].nf_f->f_av_value );
#  427|   		if ( gi->gi_numDNs ) {
#  428|-> 			int j;
#  429|   			Filter *f, *nf;
#  430|   			TAvlnode *t;

Error: COMPILER_WARNING (CWE-563): [#def998]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/nestgroup.c: scope_hint: In function ‘nestgroup_memberOfFilter’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/nestgroup.c:544:29: warning[-Wunused-variable]: unused variable ‘j’
#  544 |                         int j;
#      |                             ^
#  542|   
#  543|   		if ( gi.gi_numDNs ) {
#  544|-> 			int j;
#  545|   			Filter *f, *nf;
#  546|   			TAvlnode *t;

Error: CPPCHECK_WARNING: [#def999]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/otp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1000]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-457): [#def1001]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:761:12: warning[-Wmaybe-uninitialized]: ‘expiry_time’ may be used uninitialized
#  761 |         if ( expiry_time <= slap_get_time()) {
#      |            ^
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c: scope_hint: In function ‘pcache_db_open2’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:610:25: note: ‘expiry_time’ was declared here
#  610 |         time_t          expiry_time;
#      |                         ^~~~~~~~~~~
#  759|   
#  760|   	/* ignore expired queries */
#  761|-> 	if ( expiry_time <= slap_get_time()) {
#  762|   		Operation	op2 = *op;
#  763|   

Error: CPPCHECK_WARNING (CWE-562): [#def1002]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:864: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  862|   	op->o_tag = LDAP_REQ_ADD;
#  863|   	op->o_protocol = LDAP_VERSION3;
#  864|-> 	op->o_callback = &cb;
#  865|   	op->o_time = slap_get_time();
#  866|   	op->o_do_not_cache = 1;

Error: CPPCHECK_WARNING (CWE-562): [#def1003]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:1814: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1812|   	op->o_tag = LDAP_REQ_SEARCH;
# 1813|   	op->o_protocol = LDAP_VERSION3;
# 1814|-> 	op->o_callback = &cb;
# 1815|   	op->o_time = slap_get_time();
# 1816|   	op->o_do_not_cache = 1;

Error: CPPCHECK_WARNING (CWE-562): [#def1004]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:2140: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 2138|   	op->o_ndn = op->o_bd->be_rootndn;
# 2139|   	sc.sc_response = fetch_queryId_cb;
# 2140|-> 	op->o_callback = &sc;
# 2141|   
# 2142|   	for ( s = 0; !BER_BVISNULL( &entryUUIDs[ s ] ); s++ ) {

Error: CPPCHECK_WARNING (CWE-562): [#def1005]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:2269: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 2267|   	op->o_ndn = op->o_bd->be_rootndn;
# 2268|   	sc.sc_response = fetch_queryId_cb;
# 2269|-> 	op->o_callback = &sc;
# 2270|   
# 2271|   	rc = op->o_bd->be_search( op, &rs );

Error: CPPCHECK_WARNING (CWE-562): [#def1006]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:2620: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 2618|   		op->o_dn = op->o_bd->be_rootdn;
# 2619|   		op->o_ndn = op->o_bd->be_rootndn;
# 2620|-> 		op->o_callback = &cb;
# 2621|   		Debug( pcache_debug, "pc_setpw: CACHING BIND for %s\n",
# 2622|   			op->o_req_dn.bv_val );

Error: CPPCHECK_WARNING (CWE-562): [#def1007]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:3424: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3422|   	op->o_tag = LDAP_REQ_SEARCH;
# 3423|   	op->o_protocol = LDAP_VERSION3;
# 3424|-> 	op->o_callback = &cb;
# 3425|   	op->o_do_not_cache = 1;
# 3426|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1008]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c: scope_hint: In function ‘consistency_check’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:3589:49: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ttl’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:49: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:31: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:3552:17: note: in expansion of macro ‘Debug’
# 3587|   				expires = query;
# 3588|   				query->qtemp = NULL;
# 3589|-> 			} else if ( !templ->ttr && query->expiry_time > ttl ) {
# 3590|   				/* We don't need to check for refreshes, and this
# 3591|   				 * query's expiry is too new, and all subsequent queries

Error: COMPILER_WARNING (CWE-457): [#def1009]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c: scope_hint: In function ‘consistency_check’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:3589:49: warning[-Wmaybe-uninitialized]: ‘ttl’ may be used uninitialized
# 3589 |                         } else if ( !templ->ttr && query->expiry_time > ttl ) {
#      |                                     ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:3537:24: note: ‘ttl’ was declared here
# 3537 |                 time_t ttl;
#      |                        ^~~
# 3587|   				expires = query;
# 3588|   				query->qtemp = NULL;
# 3589|-> 			} else if ( !templ->ttr && query->expiry_time > ttl ) {
# 3590|   				/* We don't need to check for refreshes, and this
# 3591|   				 * query's expiry is too new, and all subsequent queries

Error: COMPILER_WARNING (CWE-665): [#def1010]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:3685:30: warning[-Wmissing-braces]: missing braces around initializer
# 3685 | static ConfigTable pccfg[] = {
#      |                              ^
# 3683|   static ConfigCfAdd pc_cfadd;
# 3684|   
# 3685|-> static ConfigTable pccfg[] = {
# 3686|   	{ "pcache", "backend> <max_entries> <numattrsets> <entry limit> "
# 3687|   				"<cycle_time",

Error: COMPILER_WARNING (CWE-563): [#def1011]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c: scope_hint: In function ‘pcache_monitor_free’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/pcache.c:5488:25: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
# 5488 |         int             rc;
#      |                         ^~
# 5486|   	char		textbuf[ SLAP_TEXT_BUFLEN ];
# 5487|   
# 5488|-> 	int		rc;
# 5489|   
# 5490|   	/* NOTE: if slap_shutdown != 0, priv might have already been freed */

Error: CPPCHECK_WARNING: [#def1012]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def1013]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c:451:35: warning[-Wmissing-braces]: missing braces around initializer
#  451 | static ConfigTable ppolicycfg[] = {
#      |                                   ^
#  449|   static ConfigDriver ppolicy_cf_default, ppolicy_cf_checkmod;
#  450|   
#  451|-> static ConfigTable ppolicycfg[] = {
#  452|   	{ "ppolicy_default", "policyDN", 2, 2, 0,
#  453|   	  ARG_DN|ARG_QUOTE|ARG_MAGIC|PPOLICY_DEFAULT, ppolicy_cf_default,

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1014]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c: scope_hint: In function ‘ppolicy_get’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c:1168:26: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘bd’
# 1166|   defaultpol:
# 1167|   	if ( pe ) {
# 1168|-> 		op->o_bd = bd;
# 1169|   		be_entry_release_r( op, pe );
# 1170|   		op->o_bd = bd_orig;

Error: COMPILER_WARNING (CWE-457): [#def1015]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c: scope_hint: In function ‘ppolicy_get’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c:1168:26: warning[-Wmaybe-uninitialized]: ‘bd’ may be used uninitialized
# 1168 |                 op->o_bd = bd;
#      |                 ~~~~~~~~~^~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c:958:20: note: ‘bd’ was declared here
#  958 |         BackendDB *bd, *bd_orig = op->o_bd;
#      |                    ^~
# 1166|   defaultpol:
# 1167|   	if ( pe ) {
# 1168|-> 		op->o_bd = bd;
# 1169|   		be_entry_release_r( op, pe );
# 1170|   		op->o_bd = bd_orig;

Error: COMPILER_WARNING (CWE-563): [#def1016]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c: scope_hint: In function ‘check_password_quality’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c:1280:29: warning[-Wunused-variable]: unused variable ‘prog’
# 1280 |                 check_func *prog;
#      |                             ^~~~
# 1278|   	if (pp->pwdUseCheckModule) {
# 1279|   #ifdef SLAPD_MODULES
# 1280|-> 		check_func *prog;
# 1281|   
# 1282|   		if ( !pi->pwdCheckFunc ) {

Error: COMPILER_WARNING: [#def1017]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c: scope_hint: In function ‘ppolicy_bind_response’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c:1575:95: warning[-Wformat-truncation=]: ‘__snprintf_chk’ output may be truncated before the last format character
# 1575 |         snprintf( timestamp_usec.bv_val + timestamp_usec.bv_len-1, sizeof(".123456Z"), ".%06dZ", now_usec.tt_nsec / 1000 );
#      |                                                                                               ^
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 9 and 10 bytes into a destination of size 9
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
# 1573|   	timestamp_usec.bv_val = nowstr_usec;
# 1574|   	timestamp_usec.bv_len = timestamp.bv_len;
# 1575|-> 	snprintf( timestamp_usec.bv_val + timestamp_usec.bv_len-1, sizeof(".123456Z"), ".%06dZ", now_usec.tt_nsec / 1000 );
# 1576|   	timestamp_usec.bv_len += STRLENOF(".123456");
# 1577|   

Error: COMPILER_WARNING (CWE-563): [#def1018]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c: scope_hint: In function ‘ppolicy_account_usability_entry_cb’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c:2057:22: warning[-Wunused-variable]: unused variable ‘ctrl’
# 2057 |         LDAPControl *ctrl = NULL;
#      |                      ^~~~
# 2055|   	slap_overinst *on = op->o_callback->sc_private;
# 2056|   	BackendInfo *bi = op->o_bd->bd_info;
# 2057|-> 	LDAPControl *ctrl = NULL;
# 2058|   	PassPolicy pp;
# 2059|   	Attribute *a;

Error: CLANG_WARNING: [#def1019]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c:2103:39: warning[deadcode.DeadStores]: Although the value stored to 'a' is used in the enclosing expression, the value is never actually read from 'a'
# 2101|   		}
# 2102|   	}
# 2103|-> 	if ( !isExpired && pp.pwdMaxIdle && (a = attr_find( e->e_attrs, ad_pwdLastSuccess )) ) {
# 2104|   		time_t lastbindtime = pwtime;
# 2105|   

Error: CLANG_WARNING: [#def1020]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c:3120:5: warning[deadcode.DeadStores]: Value stored to 'modtail' is never read
# 3118|   				mods->sml_next = NULL;
# 3119|   				modtail->sml_next = mods;
# 3120|-> 				modtail = mods;
# 3121|   
# 3122|   			} else {

Error: CLANG_WARNING: [#def1021]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/ppolicy.c:3174:4: warning[deadcode.DeadStores]: Value stored to 'modtail' is never read
# 3172|   			mods->sml_next = NULL;
# 3173|   			modtail->sml_next = mods;
# 3174|-> 			modtail = mods;
# 3175|   		}
# 3176|   	}

Error: CPPCHECK_WARNING: [#def1022]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/refint.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def1023]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/refint.c:111:34: warning[-Wmissing-braces]: missing braces around initializer
#  111 | static ConfigTable refintcfg[] = {
#      |                                  ^
#  109|   static ConfigDriver refint_cf_gen;
#  110|   
#  111|-> static ConfigTable refintcfg[] = {
#  112|   	{ "refint_attributes", "attribute...", 2, 0, 0,
#  113|   	  ARG_MAGIC|REFINT_ATTRS, refint_cf_gen,

Error: COMPILER_WARNING (CWE-681): [#def1024]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/refint.c: scope_hint: In function ‘refint_search_cb’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/refint.c:562:96: warning[-Wpointer-sign]: pointer targets in passing argument 4 of ‘attr_valfind’ differ in signedness
#  562 |                                         SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH, &rq->oldndn, &i, NULL );
#      |                                                                                                ^~
#      |                                                                                                |
#      |                                                                                                int *
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1189: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/refint.c:22: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/proto-slap.h:282:19: note: expected ‘unsigned int *’ but argument is of type ‘int *’
#  282 |         unsigned *slot,
#      |         ~~~~~~~~~~^~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_cdefs.h:32:33: note: in definition of macro ‘LDAP_P’
#   32 | #       define LDAP_P(protos)   protos
#      |                                 ^~~~~~
#  560|   				is_exact = attr_valfind( a,
#  561|   					SLAP_MR_EQUALITY|SLAP_MR_ASSERTED_VALUE_NORMALIZED_MATCH|
#  562|-> 					SLAP_MR_ATTRIBUTE_VALUE_NORMALIZED_MATCH, &rq->oldndn, &i, NULL );
#  563|   				if ( is_exact == LDAP_SUCCESS ) {
#  564|   					na = op->o_tmpcalloc( 1,

Error: COMPILER_WARNING (CWE-563): [#def1025]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/refint.c: scope_hint: In function ‘refint_response’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/refint.c:953:23: warning[-Wunused-variable]: unused variable ‘ip’
#  953 |         refint_attrs *ip;
#      |                       ^~
#  951|   	refint_data *id;
#  952|   	refint_q *rq;
#  953|-> 	refint_attrs *ip;
#  954|   	int ac;
#  955|   

Error: CPPCHECK_WARNING: [#def1026]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/remoteauth.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def1027]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/remoteauth.c:96:38: warning[-Wmissing-braces]: missing braces around initializer
#   96 | static ConfigTable remoteauthcfg[] = {
#      |                                      ^
#   94|   static ConfigDriver remoteauth_cf_gen;
#   95|   
#   96|-> static ConfigTable remoteauthcfg[] = {
#   97|   	{ "remoteauth_mapping", "mapping between domain and realm", 2, 3, 0,
#   98|   		ARG_MAGIC|REMOTE_AUTH_MAPPING,

Error: CLANG_WARNING: [#def1028]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/remoteauth.c:252:14: warning[deadcode.DeadStores]: Value stored to 'pin' during its initialization is never read
#  250|   					break;
#  251|   				case REMOTE_AUTH_TLS_PIN: {
#  252|-> 					ad_pin *pin = ad->pins;
#  253|   					for ( pin = ad->pins; pin; pin = pin->next ) {
#  254|   						bv.bv_val = ch_malloc( strlen( pin->hostname ) +

Error: CLANG_WARNING: [#def1029]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/remoteauth.c:291:21: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'map')
#  289|   
#  290|   						if ( pmap ) {
#  291|-> 							pmap->next = map->next;
#  292|   							map->next = NULL;
#  293|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1030]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/remoteauth.c: scope_hint: In function ‘remoteauth_cf_gen’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/remoteauth.c:291:73: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘map’
#  289|   
#  290|   						if ( pmap ) {
#  291|-> 							pmap->next = map->next;
#  292|   							map->next = NULL;
#  293|   

Error: CPPCHECK_WARNING: [#def1031]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/retcode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def1032]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/retcode.c:790:30: warning[-Wmissing-braces]: missing braces around initializer
#  790 | static ConfigTable rccfg[] = {
#      |                              ^
#  788|   static ConfigDriver rc_cf_gen;
#  789|   
#  790|-> static ConfigTable rccfg[] = {
#  791|   	{ "retcode-parent", "dn",
#  792|   		2, 2, 0, ARG_MAGIC|ARG_DN|ARG_QUOTE|RC_PARENT, rc_cf_gen,

Error: CLANG_WARNING: [#def1033]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/retcode.c:872:5: warning[deadcode.DeadStores]: Value stored to 'ptr' is never read
#  870|   				ptr = bv.bv_val = ch_malloc( bv.bv_len + 1 );
#  871|   				ptr = lutil_strcopy( ptr, buf );
#  872|-> 				ptr = lutil_strncopy( ptr, rdi->rdi_line.bv_val, rdi->rdi_line.bv_len );
#  873|   				ber_bvarray_add( &c->rvalue_vals, &bv );
#  874|   			}

Error: CPPCHECK_WARNING: [#def1034]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/rwm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def1035]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/rwm.c: scope_hint: In function ‘rwm_op_add’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/rwm.c:280:33: warning[-Wunused-but-set-variable]: variable ‘i’ set but not used
#  280 |                                 i;
#      |                                 ^
#  278|   
#  279|   	int			rc,
#  280|-> 				i;
#  281|   	Attribute		**ap = NULL;
#  282|   	char			*olddn = op->o_req_dn.bv_val;

Error: CLANG_WARNING: [#def1036]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/rwm.c:301:8: warning[deadcode.DeadStores]: Value stored to 'i' is never read
#  299|   	/* Count number of attributes in entry */ 
#  300|   	isupdate = be_shadow_update( op );
#  301|-> 	for ( i = 0, ap = &op->oq_add.rs_e->e_attrs; *ap; ) {
#  302|   		Attribute	*a;
#  303|   

Error: COMPILER_WARNING (CWE-665): [#def1037]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/rwm.c: scope_hint: At top level
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/rwm.c:1946:31: warning[-Wmissing-braces]: missing braces around initializer
# 1946 | static ConfigTable rwmcfg[] = {
#      |                               ^
# 1944|   static ConfigDriver rwm_cf_gen;
# 1945|   
# 1946|-> static ConfigTable rwmcfg[] = {
# 1947|   	{ "rwm-rewrite", "rewrite",
# 1948|   		2, 0, STRLENOF("rwm-rewrite"),

Error: CLANG_WARNING: [#def1038]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/rwm.c:2349:4: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 2347|   
# 2348|   			rwmap->rwm_rw = NULL;
# 2349|-> 			rc = rwm_info_init( &rwmap->rwm_rw );
# 2350|   
# 2351|   			for ( i = 0; i < c->valx; i++ ) {

Error: CPPCHECK_WARNING: [#def1039]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/rwmconf.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1040]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/rwmmap.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1041]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/sssvlv.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def1042]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/sssvlv.c:1034:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
# 1032|   		  tag = ber_next_element( ber, &len, end ))
# 1033|   	{
# 1034|-> 		tag = ber_skip_tag( ber, &len );
# 1035|   		ber_skip_data( ber, len );
# 1036|   		++count;

Error: CLANG_WARNING: [#def1043]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/sssvlv.c:1057:8: warning[deadcode.DeadStores]: Although the value stored to 'tag' is used in the enclosing expression, the value is never actually read from 'tag'
# 1055|   	const char *text;
# 1056|   
# 1057|-> 	if (( tag = ber_scanf( ber, "{" )) == LBER_ERROR ) {
# 1058|   		rs->sr_text = "serverSort control: decoding error";
# 1059|   		rs->sr_err = LDAP_PROTOCOL_ERROR;

Error: CLANG_WARNING: [#def1044]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/sssvlv.c:1063:8: warning[deadcode.DeadStores]: Although the value stored to 'tag' is used in the enclosing expression, the value is never actually read from 'tag'
# 1061|   	}
# 1062|   
# 1063|-> 	if (( tag = ber_scanf( ber, "m", &attr )) == LBER_ERROR ) {
# 1064|   		rs->sr_text = "serverSort control: attribute decoding error";
# 1065|   		rs->sr_err = LDAP_PROTOCOL_ERROR;

Error: CLANG_WARNING: [#def1045]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/sssvlv.c:1071:9: warning[deadcode.DeadStores]: Although the value stored to 'tag' is used in the enclosing expression, the value is never actually read from 'tag'
# 1069|   	tag = ber_peek_tag( ber, &len );
# 1070|   	if ( tag == LDAP_MATCHRULE_IDENTIFIER ) {
# 1071|-> 		if (( tag = ber_scanf( ber, "m", &matchrule )) == LBER_ERROR ) {
# 1072|   			rs->sr_text = "serverSort control: matchrule decoding error";
# 1073|   			rs->sr_err = LDAP_PROTOCOL_ERROR;

Error: CLANG_WARNING: [#def1046]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/sssvlv.c:1080:9: warning[deadcode.DeadStores]: Although the value stored to 'tag' is used in the enclosing expression, the value is never actually read from 'tag'
# 1078|   
# 1079|   	if ( tag == LDAP_REVERSEORDER_IDENTIFIER ) {
# 1080|-> 		if (( tag = ber_scanf( ber, "b", &reverse )) == LBER_ERROR ) {
# 1081|   			rs->sr_text = "serverSort control: reverse decoding error";
# 1082|   			rs->sr_err = LDAP_PROTOCOL_ERROR;

Error: CLANG_WARNING: [#def1047]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/sssvlv.c:1087:8: warning[deadcode.DeadStores]: Although the value stored to 'tag' is used in the enclosing expression, the value is never actually read from 'tag'
# 1085|   	}
# 1086|   
# 1087|-> 	if (( tag = ber_scanf( ber, "}" )) == LBER_ERROR ) {
# 1088|   		rs->sr_text = "serverSort control: decoding error";
# 1089|   		rs->sr_err = LDAP_PROTOCOL_ERROR;

Error: COMPILER_WARNING (CWE-665): [#def1048]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/sssvlv.c:1281:35: warning[-Wmissing-braces]: missing braces around initializer
# 1281 | static ConfigTable sssvlv_cfg[] = {
#      |                                   ^
# 1279|   }
# 1280|   
# 1281|-> static ConfigTable sssvlv_cfg[] = {
# 1282|   	{ "sssvlv-max", "num",
# 1283|   		2, 2, 0, ARG_INT|ARG_OFFSET,

Error: CPPCHECK_WARNING: [#def1049]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def1050]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_findbase’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:500:21: warning[-Wunused-but-set-variable]: variable ‘rc’ set but not used
#  500 |                 int rc;
#      |                     ^~
#  498|   		Operation fop;
#  499|   		SlapReply frs = { REP_RESULT };
#  500|-> 		int rc;
#  501|   
#  502|   		fc->fss->s_flags ^= PS_FIND_BASE;

Error: CLANG_WARNING: [#def1051]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:530:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  528|   
#  529|   		Debug( LDAP_DEBUG_SYNC, "%s syncprov_findbase: searching\n", op->o_log_prefix );
#  530|-> 		rc = fop.o_bd->be_search( &fop, &frs );
#  531|   	} else {
#  532|   		ldap_pvt_thread_mutex_unlock( &fc->fss->s_mutex );

Error: CLANG_WARNING: [#def1052]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:540:17: warning[core.NullDereference]: Access to field 'bv_len' results in a dereference of an undefined pointer value (loaded from field 'fdn')
#  538|   		switch ( fc->fss->s_op->ors_scope ) {
#  539|   		case LDAP_SCOPE_BASE:
#  540|-> 			fc->fscope = dn_match( fc->fdn, &fc->fss->s_base );
#  541|   			break;
#  542|   		case LDAP_SCOPE_ONELEVEL: {

Error: CLANG_WARNING: [#def1053]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:544:4: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
#  542|   		case LDAP_SCOPE_ONELEVEL: {
#  543|   			struct berval pdn;
#  544|-> 			dnParent( fc->fdn, &pdn );
#  545|   			fc->fscope = dn_match( &pdn, &fc->fss->s_base );
#  546|   			break; }

Error: CLANG_WARNING: [#def1054]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:548:17: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
#  546|   			break; }
#  547|   		case LDAP_SCOPE_SUBTREE:
#  548|-> 			fc->fscope = dnIsSuffix( fc->fdn, &fc->fss->s_base );
#  549|   			break;
#  550|   		case LDAP_SCOPE_SUBORDINATE:

Error: CLANG_WARNING: [#def1055]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:551:17: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
#  549|   			break;
#  550|   		case LDAP_SCOPE_SUBORDINATE:
#  551|-> 			fc->fscope = dnIsSuffix( fc->fdn, &fc->fss->s_base ) &&
#  552|   				!dn_match( fc->fdn, &fc->fss->s_base );
#  553|   			break;

Error: COMPILER_WARNING (CWE-563): [#def1056]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_findcsn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:683:23: warning[-Wunused-but-set-variable]: variable ‘srs’ set but not used
#  683 |         sync_control *srs = NULL;
#      |                       ^~~
#  681|   	AttributeAssertion eq = ATTRIBUTEASSERTION_INIT;
#  682|   	fpres_cookie pcookie;
#  683|-> 	sync_control *srs = NULL;
#  684|   	struct slap_limits_set fc_limits;
#  685|   	int i, rc = LDAP_SUCCESS, findcsn_retry = 1;

Error: CLANG_WARNING: [#def1057]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:689:3: warning[deadcode.DeadStores]: Value stored to 'srs' is never read
#  687|   
#  688|   	if ( mode != FIND_MAXCSN ) {
#  689|-> 		srs = op->o_controls[slap_cids.sc_LDAPsync];
#  690|   	}
#  691|   

Error: CLANG_WARNING: [#def1058]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:734:19: warning[core.uninitialized.ArraySubscript]: Array subscript is undefined
#  732|   			return LDAP_NO_SUCH_OBJECT;
#  733|   		}
#  734|-> 		cf.f_av_value = si->si_ctxcsn[maxid];
#  735|   		fop.ors_filterstr.bv_len = snprintf( buf, sizeof( buf ),
#  736|   			"(entryCSN>=%s)", cf.f_av_value.bv_val );

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1059]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_findcsn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:734:46: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘maxid’
#  732|   			return LDAP_NO_SUCH_OBJECT;
#  733|   		}
#  734|-> 		cf.f_av_value = si->si_ctxcsn[maxid];
#  735|   		fop.ors_filterstr.bv_len = snprintf( buf, sizeof( buf ),
#  736|   			"(entryCSN>=%s)", cf.f_av_value.bv_val );

Error: COMPILER_WARNING (CWE-457): [#def1060]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_findcsn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:734:46: warning[-Wmaybe-uninitialized]: ‘maxid’ may be used uninitialized
#  734 |                 cf.f_av_value = si->si_ctxcsn[maxid];
#      |                                              ^
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:686:13: note: ‘maxid’ was declared here
#  686 |         int maxid;
#      |             ^~~~~
#  732|   			return LDAP_NO_SUCH_OBJECT;
#  733|   		}
#  734|-> 		cf.f_av_value = si->si_ctxcsn[maxid];
#  735|   		fop.ors_filterstr.bv_len = snprintf( buf, sizeof( buf ),
#  736|   			"(entryCSN>=%s)", cf.f_av_value.bv_val );

Error: CPPCHECK_WARNING (CWE-562): [#def1061]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:1330: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1328|   		if ( !SLAP_ISOVERLAY( op->o_bd )) {
# 1329|   			db = *op->o_bd;
# 1330|-> 			op->o_bd = &db;
# 1331|   		}
# 1332|   		rc = overlay_entry_get_ov( op, fc.fdn, NULL, NULL, 0, &e, on );

Error: CLANG_WARNING: [#def1062]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:1364:21: warning[core.NullDereference]: Access to field 'e_ocflags' results in a dereference of a null pointer (loaded from variable 'e')
# 1362|   			ber_dupbv_x( &opc->sndn, &e->e_nname, op->o_tmpmemctx );
# 1363|   		}
# 1364|-> 		opc->sreference = is_entry_referral( e );
# 1365|   		a = attr_find( e->e_attrs, slap_schema.si_ad_entryUUID );
# 1366|   		if ( a )

Error: COMPILER_WARNING (CWE-563): [#def1063]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:2020:21: warning[-Wunused-variable]: unused variable ‘se’
# 2020 |         slog_entry *se;
#      |                     ^~
# 2018|   	BerVarray uuids, csns;
# 2019|   	struct berval uuid[2] = {}, csn[2] = {};
# 2020|-> 	slog_entry *se;
# 2021|   	TAvlnode *entry;
# 2022|   	char cbuf[LDAP_PVT_CSNSTR_BUFSIZE];

Error: COMPILER_WARNING (CWE-563): [#def1064]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:2022:14: warning[-Wunused-variable]: unused variable ‘cbuf’
# 2022 |         char cbuf[LDAP_PVT_CSNSTR_BUFSIZE];
#      |              ^~~~
# 2020|   	slog_entry *se;
# 2021|   	TAvlnode *entry;
# 2022|-> 	char cbuf[LDAP_PVT_CSNSTR_BUFSIZE];
# 2023|   	struct berval delcsn[2];
# 2024|   

Error: COMPILER_WARNING (CWE-563): [#def1065]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_play_sessionlog’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:2023:23: warning[-Wunused-variable]: unused variable ‘delcsn’
# 2023 |         struct berval delcsn[2];
#      |                       ^~~~~~
# 2021|   	TAvlnode *entry;
# 2022|   	char cbuf[LDAP_PVT_CSNSTR_BUFSIZE];
# 2023|-> 	struct berval delcsn[2];
# 2024|   
# 2025|   	ldap_pvt_thread_rdwr_wlock( &sl->sl_mutex );

Error: COMPILER_WARNING (CWE-457): [#def1066]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:2037:20: warning[-Wmaybe-uninitialized]: ‘minsid’ may be used uninitialized
# 2037 |                 if ( minsid < sl->sl_sids[i] ) {
#      |                    ^
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_op_search’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:3132:13: note: ‘minsid’ was declared here
# 3132 |         int minsid, maxsid;
#      |             ^~~~~~
# 2035|   	for ( i=0; i<sl->sl_numcsns; i++ ) {
# 2036|   		/* SID not present == new enough */
# 2037|-> 		if ( minsid < sl->sl_sids[i] ) {
# 2038|   			do_play = 1;
# 2039|   			break;

Error: COMPILER_WARNING (CWE-563): [#def1067]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_op_response’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:2467:22: warning[-Wunused-variable]: unused variable ‘sm’
# 2467 |         syncmatches *sm;
#      |                      ^~
# 2465|   	slap_overinst *on = opc->son;
# 2466|   	syncprov_info_t		*si = on->on_bi.bi_private;
# 2467|-> 	syncmatches *sm;
# 2468|   
# 2469|   	if ( rs->sr_err == LDAP_SUCCESS )

Error: COMPILER_WARNING (CWE-563): [#def1068]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_op_search’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:3251:29: warning[-Wunused-variable]: unused variable ‘sl’
# 3251 |                 sessionlog *sl;
#      |                             ^~
# 3249|   	/* If we have a cookie, handle the PRESENT lookups */
# 3250|   	if ( srs->sr_state.ctxcsn ) {
# 3251|-> 		sessionlog *sl;
# 3252|   		int i, j;
# 3253|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1069]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c: scope_hint: In function ‘syncprov_op_search’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:3357:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘maxcsn.bv_val’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:3145:18: note: in expansion of macro ‘ors_deref’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:54: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:3356:22: note: in expansion of macro ‘BER_BVISEMPTY’
# 3355|   		}
# 3356|   		if ( BER_BVISEMPTY( &mincsn )) {
# 3357|-> 			mincsn = maxcsn;
# 3358|   			minsid = maxsid;
# 3359|   		}

Error: CLANG_WARNING: [#def1070]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:3358:11: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 3356|   		if ( BER_BVISEMPTY( &mincsn )) {
# 3357|   			mincsn = maxcsn;
# 3358|-> 			minsid = maxsid;
# 3359|   		}
# 3360|   

Error: COMPILER_WARNING (CWE-665): [#def1071]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c: scope_hint: At top level
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:3695:30: warning[-Wmissing-braces]: missing braces around initializer
# 3695 | static ConfigTable spcfg[] = {
#      |                              ^
# 3693|   static ConfigDriver sp_cf_gen;
# 3694|   
# 3695|-> static ConfigTable spcfg[] = {
# 3696|   	{ "syncprov-checkpoint", "ops> <minutes", 3, 3, 0, ARG_MAGIC|SP_CHKPT,
# 3697|   		sp_cf_gen, "( OLcfgOvAt:1.1 NAME 'olcSpCheckpoint' "

Error: CLANG_WARNING: [#def1072]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:4152:24: warning[deadcode.DeadStores]: Although the value stored to 'sonext' is used in the enclosing expression, the value is never actually read from 'sonext'
# 4150|   	if ( !slapd_shutdown ) {
# 4151|   		ldap_pvt_thread_mutex_lock( &si->si_ops_mutex );
# 4152|-> 		for ( so=si->si_ops, sonext=so;  so; so=sonext  ) {
# 4153|   			SlapReply rs = {REP_RESULT};
# 4154|   			rs.sr_err = LDAP_UNAVAILABLE;

Error: CLANG_WARNING: [#def1073]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/syncprov.c:4292:8: warning[deadcode.DeadStores]: Although the value stored to 'tag' is used in the enclosing expression, the value is never actually read from 'tag'
# 4290|   	ber_init2( ber, &ctrl->ldctl_value, 0 );
# 4291|   
# 4292|-> 	if ( (tag = ber_scanf( ber, "{i" /*}*/, &mode )) == LBER_ERROR ) {
# 4293|   		rs->sr_text = "Sync control : mode decoding error";
# 4294|   		return LDAP_PROTOCOL_ERROR;

Error: CPPCHECK_WARNING: [#def1074]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/translucent.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def1075]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/translucent.c:58:39: warning[-Wmissing-braces]: missing braces around initializer
#   58 | static ConfigTable translucentcfg[] = {
#      |                                       ^
#   56|   };
#   57|   
#   58|-> static ConfigTable translucentcfg[] = {
#   59|   	{ "translucent_strict", "on|off", 1, 2, 0,
#   60|   	  ARG_ON_OFF|ARG_OFFSET,

Error: CPPCHECK_WARNING (CWE-562): [#def1076]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/translucent.c:1272: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 1270|   		sc.sc_response = slap_null_cb;
# 1271|   		save_cb = op->o_callback;
# 1272|-> 		op->o_callback = &sc;
# 1273|   	}
# 1274|   

Error: CLANG_WARNING: [#def1077]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/translucent.c:1282:18: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
# 1280|   
# 1281|   	if (ov->bind_local) {
# 1282|-> 		op->o_callback = save_cb;
# 1283|   		if (rc != LDAP_SUCCESS) {
# 1284|   			rc = SLAP_CB_CONTINUE;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1078]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/translucent.c: scope_hint: In function ‘translucent_bind’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/translucent.c:1282:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘save_cb’
# 1280|   
# 1281|   	if (ov->bind_local) {
# 1282|-> 		op->o_callback = save_cb;
# 1283|   		if (rc != LDAP_SUCCESS) {
# 1284|   			rc = SLAP_CB_CONTINUE;

Error: COMPILER_WARNING (CWE-457): [#def1079]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/translucent.c: scope_hint: In function ‘translucent_bind’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/translucent.c:1282:32: warning[-Wmaybe-uninitialized]: ‘save_cb’ may be used uninitialized
# 1282 |                 op->o_callback = save_cb;
#      |                 ~~~~~~~~~~~~~~~^~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/translucent.c:1257:36: note: ‘save_cb’ was declared here
# 1257 |         slap_callback sc = { 0 }, *save_cb;
#      |                                    ^~~~~~~
# 1280|   
# 1281|   	if (ov->bind_local) {
# 1282|-> 		op->o_callback = save_cb;
# 1283|   		if (rc != LDAP_SUCCESS) {
# 1284|   			rc = SLAP_CB_CONTINUE;

Error: CPPCHECK_WARNING: [#def1080]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/unique.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def1081]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/unique.c:89:34: warning[-Wmissing-braces]: missing braces around initializer
#   89 | static ConfigTable uniquecfg[] = {
#      |                                  ^
#   87|   static ConfigDriver unique_cf_uri;
#   88|   
#   89|-> static ConfigTable uniquecfg[] = {
#   90|   	{ "unique_base", "basedn", 2, 2, 0, ARG_DN|ARG_QUOTE|ARG_MAGIC|UNIQUE_BASE,
#   91|   	  unique_cf_base, "( OLcfgOvAt:10.1 NAME 'olcUniqueBase' "

Error: COMPILER_WARNING (CWE-563): [#def1082]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/unique.c: scope_hint: In function ‘unique_new_domain’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/unique.c:335:13: warning[-Wunused-but-set-variable]: variable ‘uri_err’ set but not used
#  335 |         int uri_err = 0;
#      |             ^~~~~~~
#  333|   	char *uri_start;
#  334|   	int rc = LDAP_SUCCESS;
#  335|-> 	int uri_err = 0;
#  336|   	unique_domain * domain;
#  337|   	LDAPURLDesc *url_desc, *url_descs = NULL;

Error: CLANG_WARNING: [#def1083]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/unique.c:384:4: warning[deadcode.DeadStores]: Value stored to 'uri_err' is never read
#  382|   		if ( rc ) {
#  383|   			rc = ARG_BAD_CONF;
#  384|-> 			uri_err = 1;
#  385|   			goto exit;
#  386|   		}

Error: CLANG_WARNING: [#def1084]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/unique.c:475:13: warning[core.NullDereference]: Dereference of null pointer
#  473|   		if ( !legacy->uri )
#  474|   			unique_new_domain_uri_basic ( &legacy->uri, c );
#  475|-> 		ch_free ( legacy->uri->dn.bv_val );
#  476|   		ch_free ( legacy->uri->ndn.bv_val );
#  477|   		legacy->uri->dn = c->value_dn;

Error: CLANG_WARNING: [#def1085]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/unique.c:627:9: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'attrp')
#  625|   		}
#  626|   		for ( attrp = &legacy->uri->attrs;
#  627|-> 		      *attrp;
#  628|   		      attrp = &(*attrp)->next ) ;
#  629|   		*attrp = reverse_attrs;

Error: CLANG_WARNING: [#def1086]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/unique.c:769:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  767|   			break;
#  768|   		}
#  769|-> 		rc = 0;
#  770|   		if ( c->line ) rc = unique_new_domain ( &domain, c->line, c );
#  771|   		else rc = unique_new_domain ( &domain, c->argv[1], c );

Error: CPPCHECK_WARNING (CWE-562): [#def1087]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/unique.c:997: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  995|   	cb.sc_response	= (slap_response*)count_attr_cb;
#  996|   	cb.sc_private	= &uq;
#  997|-> 	nop->o_callback	= &cb;
#  998|   	nop->o_tag	= LDAP_REQ_SEARCH;
#  999|   	nop->ors_scope	= scope;

Error: CPPCHECK_WARNING: [#def1088]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/valsort.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-665): [#def1089]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/valsort.c:58:38: warning[-Wmissing-braces]: missing braces around initializer
#   58 | static ConfigTable valsort_cfats[] = {
#      |                                      ^
#   56|   static ConfigDriver valsort_cf_func;
#   57|   
#   58|-> static ConfigTable valsort_cfats[] = {
#   59|   	{ "valsort-attr", "attribute> <dn> <sort-type", 4, 5, 0, ARG_MAGIC,
#   60|   		valsort_cf_func, "( OLcfgOvAt:5.1 NAME 'olcValSortAttr' "

Error: CLANG_WARNING: [#def1090]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/valsort.c:146:23: warning[core.NullDereference]: Access to field 'vi_next' results in a dereference of a null pointer (loaded from variable 'vi')
#  144|   				vi = *prev; vi && i<c->valx;
#  145|   				prev = &vi->vi_next, vi = vi->vi_next, i++ );
#  146|-> 			(*prev)->vi_next = vi->vi_next;
#  147|   			ch_free( vi->vi_dn.bv_val );
#  148|   			ch_free( vi );

Error: CLANG_WARNING: [#def1091]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/valsort.c:532:8: warning[deadcode.DeadStores]: Although the value stored to 'tag' is used in the enclosing expression, the value is never actually read from 'tag'
#  530|   
#  531|   	ber_init2( ber, &ctrl->ldctl_value, 0 );
#  532|-> 	if (( tag = ber_scanf( ber, "{b}", &flag )) == LBER_ERROR ) {
#  533|   		rs->sr_text = "valSort control: flag decoding error";
#  534|   		return LDAP_PROTOCOL_ERROR;

Error: COMPILER_WARNING: [#def1092]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def1093]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/overlays/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: ../liboverlays.a 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def1094]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1095]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c: scope_hint: In function ‘passwd_extop’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:102:46: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘idNul’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:17: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:54: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:32: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:88:45: note: in expansion of macro ‘BER_BVISEMPTY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:49: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:94:17: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:162:62: note: in definition of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:94:17: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:101:23: note: in expansion of macro ‘BER_BVISNULL’
#  100|   	if ( rs->sr_err != LDAP_SUCCESS ) {
#  101|   		if ( !BER_BVISNULL( &id ))
#  102|-> 			id.bv_val[id.bv_len] = idNul;
#  103|   		return rs->sr_err;
#  104|   	}

Error: CLANG_WARNING: [#def1096]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:108:24: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  106|   	if ( !BER_BVISEMPTY( &id ) ) {
#  107|   		rs->sr_err = dnPrettyNormal( NULL, &id, &dn, &ndn, op->o_tmpmemctx );
#  108|-> 		id.bv_val[id.bv_len] = idNul;
#  109|   		if ( rs->sr_err != LDAP_SUCCESS ) {
#  110|   			rs->sr_text = "Invalid DN";

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1097]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:108:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘idNul’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:88:45: note: in expansion of macro ‘BER_BVISEMPTY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ldap_log.h:185:9: note: in expansion of macro ‘Log’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:89:17: note: in expansion of macro ‘Debug’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:106:15: note: in expansion of macro ‘BER_BVISEMPTY’
#  106|   	if ( !BER_BVISEMPTY( &id ) ) {
#  107|   		rs->sr_err = dnPrettyNormal( NULL, &id, &dn, &ndn, op->o_tmpmemctx );
#  108|-> 		id.bv_val[id.bv_len] = idNul;
#  109|   		if ( rs->sr_err != LDAP_SUCCESS ) {
#  110|   			rs->sr_text = "Invalid DN";

Error: COMPILER_WARNING (CWE-457): [#def1098]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c: scope_hint: In function ‘passwd_extop’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:108:38: warning[-Wmaybe-uninitialized]: ‘idNul’ may be used uninitialized
#  108 |                 id.bv_val[id.bv_len] = idNul;
#      |                 ~~~~~~~~~~~~~~~~~~~~~^~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:59:24: note: ‘idNul’ was declared here
#   59 |         char **hashes, idNul;
#      |                        ^~~~~
#  106|   	if ( !BER_BVISEMPTY( &id ) ) {
#  107|   		rs->sr_err = dnPrettyNormal( NULL, &id, &dn, &ndn, op->o_tmpmemctx );
#  108|-> 		id.bv_val[id.bv_len] = idNul;
#  109|   		if ( rs->sr_err != LDAP_SUCCESS ) {
#  110|   			rs->sr_text = "Invalid DN";

Error: CPPCHECK_WARNING (CWE-562): [#def1099]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:297: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  295|   
#  296|   		op->o_tag = LDAP_REQ_MODIFY;
#  297|-> 		op->o_callback = &cb;
#  298|   		op->orm_modlist = qpw->rs_mods;
#  299|   		op->orm_no_opattrs = 0;

Error: CLANG_WARNING: [#def1100]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/passwd.c:458:3: warning[deadcode.DeadStores]: Value stored to 'tag' is never read
#  456|   		}
#  457|   
#  458|-> 		tag = ber_peek_tag( ber, &len );
#  459|   	}
#  460|   

Error: CPPCHECK_WARNING: [#def1101]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/proxyp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1102]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/referral.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1103]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def1104]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:349:3: warning[core.NullDereference]: Access to field 'c_writers' results in a dereference of a null pointer (loaded from variable 'conn')
#  347|   	ldap_pvt_thread_mutex_lock( &conn->c_write1_mutex );
#  348|   	if (( op->o_abandon && !op->o_cancel ) || !connection_valid( conn ) ||
#  349|-> 		conn->c_writers < 0 ) {
#  350|   		ldap_pvt_thread_mutex_unlock( &conn->c_write1_mutex );
#  351|   		return 0;

Error: CLANG_WARNING: [#def1105]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:471:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  469|   	assert( c != NULL );
#  470|   
#  471|-> 	rc = ber_printf( ber, "{s" /*}*/, c->ldctl_oid );
#  472|   
#  473|   	if( c->ldctl_iscritical ) {

Error: CLANG_WARNING: [#def1106]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:1261:28: warning[core.NullDereference]: Array access (from variable 'e_flags') results in a null pointer dereference
# 1259|   				}
# 1260|   
# 1261|-> 				if ( op->o_vrFilter && e_flags[j][i] == 0 ){
# 1262|   					continue;
# 1263|   				}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1107]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c: scope_hint: In function ‘slap_send_search_entry’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:1261:63: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘e_flags’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:38: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:2147:12: note: in definition of macro ‘SLAP_USERATTRS’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:1145:41: note: in expansion of macro ‘sr_attr_flags’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:3387: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:1250:40: note: in expansion of macro ‘access_allowed’
# 1259|   				}
# 1260|   
# 1261|-> 				if ( op->o_vrFilter && e_flags[j][i] == 0 ){
# 1262|   					continue;
# 1263|   				}

Error: CLANG_WARNING: [#def1108]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:1268:12: warning[deadcode.DeadStores]: Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc'
# 1266|   					first = 0;
# 1267|   					finish = 1;
# 1268|-> 					if (( rc = ber_printf( ber, "{O[" /*]}*/ , &desc->ad_cname )) == -1 ) {
# 1269|   						Debug( LDAP_DEBUG_ANY,
# 1270|   							"send_search_entry: conn %lu  ber_printf failed\n", 

Error: CLANG_WARNING: [#def1109]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:1426:28: warning[core.NullDereference]: Array access (from variable 'e_flags') results in a null pointer dereference
# 1424|   				}
# 1425|   
# 1426|-> 				if ( op->o_vrFilter && e_flags[j][i] == 0 ){
# 1427|   					continue;
# 1428|   				}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1110]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:1426:63: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘e_flags’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:2147:12: note: in definition of macro ‘SLAP_USERATTRS’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:1145:41: note: in expansion of macro ‘sr_attr_flags’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:1389:24: note: in expansion of macro ‘access_allowed’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:1415:40: note: in expansion of macro ‘access_allowed’
# 1424|   				}
# 1425|   
# 1426|-> 				if ( op->o_vrFilter && e_flags[j][i] == 0 ){
# 1427|   					continue;
# 1428|   				}

Error: CLANG_WARNING: [#def1111]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:1430:11: warning[deadcode.DeadStores]: Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc'
# 1428|   				}
# 1429|   
# 1430|-> 				if (( rc = ber_printf( ber, "O", &a->a_vals[i] )) == -1 ) {
# 1431|   					Debug( LDAP_DEBUG_ANY,
# 1432|   						"send_search_entry: conn %lu  ber_printf failed\n", 

Error: CLANG_WARNING: [#def1112]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/result.c:1444:9: warning[deadcode.DeadStores]: Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc'
# 1442|   		}
# 1443|   
# 1444|-> 		if (( rc = ber_printf( ber, /*{[*/ "]N}" )) == -1 ) {
# 1445|   			Debug( LDAP_DEBUG_ANY,
# 1446|   				"send_search_entry: conn %lu  ber_printf failed\n",

Error: CPPCHECK_WARNING: [#def1113]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/root_dse.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def1114]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/root_dse.c: scope_hint: In function ‘root_dse_info’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/root_dse.c:189:28: warning[-Wunused-variable]: unused variable ‘j’
#  189 |         int             i, j;
#      |                            ^
#  187|   	struct berval *bv;
#  188|   #endif
#  189|-> 	int		i, j;
#  190|   	char ** supportedSASLMechanisms;
#  191|   	BackendDB *be;

Error: CPPCHECK_WARNING: [#def1115]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/sasl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1116]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def1117]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c: scope_hint: In function ‘authzValidate’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c:318:17: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 8192 equals destination size
#  318 |                 strncpy( buf, in->bv_val, sizeof( buf ) );
#      |                 ^
#  316|   		id.bv_len = in->bv_len;
#  317|   		id.bv_val = buf;
#  318|-> 		strncpy( buf, in->bv_val, sizeof( buf ) );
#  319|   
#  320|   		rc = slap_parse_user( &id, &user, &realm, &mech );

Error: COMPILER_WARNING: [#def1118]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c: scope_hint: In function ‘authzPrettyNormal’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c:630:17: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 8192 equals destination size
#  630 |                 strncpy( buf, val->bv_val, sizeof( buf ) );
#      |                 ^
#  628|   		id.bv_len = val->bv_len;
#  629|   		id.bv_val = buf;
#  630|-> 		strncpy( buf, val->bv_val, sizeof( buf ) );
#  631|   
#  632|   		rc = slap_parse_user( &id, &user, &realm, &mech );

Error: COMPILER_WARNING: [#def1119]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c: scope_hint: In function ‘slap_parseURI’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c:1062:17: warning[-Wstringop-truncation]: ‘strncpy’ specified bound 8192 equals destination size
# 1062 |                 strncpy( buf, uri->bv_val, sizeof( buf ) );
#      |                 ^
# 1060|   		id.bv_len = uri->bv_len;
# 1061|   		id.bv_val = buf;
# 1062|-> 		strncpy( buf, uri->bv_val, sizeof( buf ) );
# 1063|   
# 1064|   		rc = slap_parse_user( &id, &user, &realm, &mech );

Error: CLANG_WARNING: [#def1120]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c:1154:3: warning[deadcode.DeadStores]: Value stored to 'tmp' is never read
# 1152|   				STRLENOF( /* ( */ ")(" /* ) */ ) );
# 1153|   		tmp = lutil_strncopy( tmp, member_at.bv_val, member_at.bv_len );
# 1154|-> 		tmp = lutil_strncopy( tmp, "=", STRLENOF( "=" ) );
# 1155|   
# 1156|   		return rc;

Error: COMPILER_WARNING (CWE-563): [#def1121]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c:1353:18: warning[-Wunused-variable]: unused variable ‘line’
# 1353 |         char    *line;
#      |                  ^~~~
# 1351|   {
# 1352|   	int	rc, i, last;
# 1353|-> 	char	*line;
# 1354|   	struct berval bv;
# 1355|   	struct rewrite_info *rw = sasl_rwinfo;

Error: COMPILER_WARNING (CWE-563): [#def1122]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c: scope_hint: In function ‘slap_sasl_rewrite_config’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c:1354:23: warning[-Wunused-variable]: unused variable ‘bv’
# 1354 |         struct berval bv;
#      |                       ^~
# 1352|   	int	rc, i, last;
# 1353|   	char	*line;
# 1354|-> 	struct berval bv;
# 1355|   	struct rewrite_info *rw = sasl_rwinfo;
# 1356|   

Error: CPPCHECK_WARNING (CWE-457): [#def1123]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c:1442: warning[uninitvar]: Uninitialized variable: rc
# 1440|   	}
# 1441|   
# 1442|-> 	return rc;
# 1443|   }
# 1444|   

Error: CLANG_WARNING: [#def1124]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c:1442:2: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
# 1440|   	}
# 1441|   
# 1442|-> 	return rc;
# 1443|   }
# 1444|   

Error: CPPCHECK_WARNING (CWE-909): [#def1125]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c:1528: error[uninitStructMember]: Uninitialized struct member: sr.sr_match
# 1526|   		}
# 1527|   
# 1528|-> 		SaslRegexp[i] = sr;
# 1529|   		SaslRegexp[i].sr_match = ch_strdup( match );
# 1530|   		SaslRegexp[i].sr_replace = ch_strdup( replace );

Error: CPPCHECK_WARNING (CWE-909): [#def1126]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c:1528: error[uninitStructMember]: Uninitialized struct member: sr.sr_replace
# 1526|   		}
# 1527|   
# 1528|-> 		SaslRegexp[i] = sr;
# 1529|   		SaslRegexp[i].sr_match = ch_strdup( match );
# 1530|   		SaslRegexp[i].sr_replace = ch_strdup( replace );

Error: CPPCHECK_WARNING (CWE-457): [#def1127]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c:1528: error[uninitvar]: Uninitialized variable: sr
# 1526|   		}
# 1527|   
# 1528|-> 		SaslRegexp[i] = sr;
# 1529|   		SaslRegexp[i].sr_match = ch_strdup( match );
# 1530|   		SaslRegexp[i].sr_replace = ch_strdup( replace );

Error: CLANG_WARNING: [#def1128]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c:1864:3: warning[deadcode.DeadStores]: Value stored to 'tmp' is never read
# 1862|   		
# 1863|   		tmp = lutil_strcopy( &tmp[op.ors_filterstr.bv_len], assertDN->bv_val );
# 1864|-> 		tmp = lutil_strcopy( tmp, /*"(("*/ "))" );
# 1865|   
# 1866|   		/* pass opx because str2filter_x may (and does) use o_tmpmfuncs */

Error: CLANG_WARNING: [#def1129]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/saslauthz.c:2076:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
# 2074|   	/* Must run an internal search. */
# 2075|   	if ( op.ors_filter == NULL ) {
# 2076|-> 		rc = LDAP_FILTER_ERROR;
# 2077|   		goto FINISHED;
# 2078|   	}

Error: CPPCHECK_WARNING: [#def1130]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/schema.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1131]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/schema_check.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1132]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/schema_init.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def1133]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/schema_init.c:2728: warning[uninitvar]: Uninitialized variable: rc
# 2726|   		slap_sl_free( itmp.bv_val, ctx );
# 2727|   	}
# 2728|-> 	return rc;
# 2729|   }
# 2730|   

Error: CPPCHECK_WARNING (CWE-758): [#def1134]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/schema_init.c:3597: warning[objectIndex]: The address of variable 'zero' might be accessed at non-zero index.
# 3595|   	}
# 3596|   	for ( ; i < len; i++ ) {
# 3597|-> 		sprintf( sptr, "%02X", ptr[i] );
# 3598|   		sptr += 2;
# 3599|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def1135]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/schema_init.c:5303: error[uninitvar]: Uninitialized variable: bv.bv_val
# 5301|   	bv.bv_val = buf;
# 5302|   
# 5303|-> 	ptr = bv.bv_val;
# 5304|   	ptr = lutil_strncopy( ptr, gt.bv_val, STRLENOF( "YYYYmmddHH" ) );
# 5305|   	ptr = lutil_strncopy( ptr, &gt.bv_val[ STRLENOF( "YYYYmmddHH:" ) ],

Error: CPPCHECK_WARNING (CWE-457): [#def1136]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/schema_init.c:5400: error[uninitvar]: Uninitialized variable: bv.bv_val
# 5398|   	bv.bv_val = buf;
# 5399|   
# 5400|-> 	ptr = bv.bv_val;
# 5401|   	ptr = lutil_strncopy( ptr, gt.bv_val, gt.bv_len - 1 );
# 5402|   	ptr = lutil_strcopy( ptr, ".000000Z#" );

Error: CPPCHECK_WARNING: [#def1137]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/schema_prep.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1138]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/search.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1139]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/sets.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1140]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/sl_malloc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def1141]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/sl_malloc.c:673: error[legacyUninitvar]: Uninitialized variable: memctx
#  671|   	if ( slapMode & SLAP_TOOL_MODE ) return NULL;
#  672|   
#  673|-> 	sh = GET_MEMCTX(ldap_pvt_thread_pool_context(), &memctx);
#  674|   	if (sh && ptr >= sh->sh_base && ptr <= sh->sh_end) {
#  675|   		return sh;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1142]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/database.c:28: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/database.c: scope_hint: In function ‘monitor_subsys_database_modify’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:2383:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘be’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:2384:34: note: in expansion of macro ‘SLAP_BFLAGS’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/database.c:656:14: note: in expansion of macro ‘SLAP_MONITOR’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:57: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/database.c:649:9: note: in expansion of macro ‘LDAP_STAILQ_FOREACH’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:2384:34: note: in expansion of macro ‘SLAP_BFLAGS’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/back-monitor/database.c:656:14: note: in expansion of macro ‘SLAP_MONITOR’
# 2381|   #define	SLAPO_BFLAG_MASK		0xFF000000U
# 2382|   
# 2383|-> #define SLAP_BFLAGS(be)		((be)->bd_info->bi_flags)
# 2384|   #define SLAP_MONITOR(be)	(SLAP_BFLAGS(be) & SLAP_BFLAG_MONITOR)
# 2385|   #define SLAP_CONFIG(be)		(SLAP_BFLAGS(be) & SLAP_BFLAG_CONFIG)

Error: CPPCHECK_WARNING: [#def1143]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapadd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def1144]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapadd.c:126:19: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  124|   		e = str2entry2( buf, checkvals );
#  125|   		if ( !dbnum ) {
#  126|-> 			slap_DN_strict = prev_DN_strict;
#  127|   		}
#  128|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1145]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapadd.c: scope_hint: In function ‘getrec0’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapadd.c:126:40: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘prev_DN_strict’
#  124|   		e = str2entry2( buf, checkvals );
#  125|   		if ( !dbnum ) {
#  126|-> 			slap_DN_strict = prev_DN_strict;
#  127|   		}
#  128|   

Error: COMPILER_WARNING (CWE-457): [#def1146]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapadd.c: scope_hint: In function ‘getrec0’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapadd.c:126:40: warning[-Wmaybe-uninitialized]: ‘prev_DN_strict’ may be used uninitialized
#  126 |                         slap_DN_strict = prev_DN_strict;
#      |                         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapadd.c:115:21: note: ‘prev_DN_strict’ was declared here
#  115 |                 int prev_DN_strict;
#      |                     ^~~~~~~~~~~~~~
#  124|   		e = str2entry2( buf, checkvals );
#  125|   		if ( !dbnum ) {
#  126|-> 			slap_DN_strict = prev_DN_strict;
#  127|   		}
#  128|   

Error: CLANG_WARNING: [#def1147]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapadd.c:485:3: warning[core.CallAndMessage]: 1st function call argument is an uninitialized value
#  483|   		ldap_pvt_thread_cond_signal( &add_cond );
#  484|   		ldap_pvt_thread_mutex_unlock( &add_mutex );
#  485|-> 		ldap_pvt_thread_join( thr, NULL );
#  486|   	}
#  487|   	if ( erec.e ) entry_free( erec.e );

Error: CPPCHECK_WARNING: [#def1148]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapcat.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1149]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapcommon.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def1150]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapcommon.c:203:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  201|   		switch ( tool ) {
#  202|   		case SLAPADD:
#  203|-> 			if ( strcasecmp( p, "yes" ) == 0 ) {
#  204|   				*mode &= ~SLAP_TOOL_NO_SCHEMA_CHECK;
#  205|   			} else if ( strcasecmp( p, "no" ) == 0 ) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1151]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapcommon.c: scope_hint: In function ‘parse_slapopt’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapcommon.c:203:30: warning[-Wanalyzer-null-argument]: use of NULL ‘p’ where non-null expected
/usr/include/string.h:462: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/string.h:21: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapcommon.c:33: included_from: Included from here.
/usr/include/strings.h:116:12: note: argument 1 of ‘strcasecmp’ must be non-null
#  201|   		switch ( tool ) {
#  202|   		case SLAPADD:
#  203|-> 			if ( strcasecmp( p, "yes" ) == 0 ) {
#  204|   				*mode &= ~SLAP_TOOL_NO_SCHEMA_CHECK;
#  205|   			} else if ( strcasecmp( p, "no" ) == 0 ) {

Error: CLANG_WARNING: [#def1152]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapcommon.c:221:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  219|   		switch ( tool ) {
#  220|   		case SLAPADD:
#  221|-> 			if ( strcasecmp( p, "yes" ) == 0 ) {
#  222|   				*mode |= SLAP_TOOL_VALUE_CHECK;
#  223|   			} else if ( strcasecmp( p, "no" ) == 0 ) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1153]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapcommon.c:221:30: warning[-Wanalyzer-null-argument]: use of NULL ‘p’ where non-null expected
/usr/include/strings.h:116:12: note: argument 1 of ‘strcasecmp’ must be non-null
#  219|   		switch ( tool ) {
#  220|   		case SLAPADD:
#  221|-> 			if ( strcasecmp( p, "yes" ) == 0 ) {
#  222|   				*mode |= SLAP_TOOL_VALUE_CHECK;
#  223|   			} else if ( strcasecmp( p, "no" ) == 0 ) {

Error: CLANG_WARNING: [#def1154]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapcommon.c:240:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  238|   		switch ( tool ) {
#  239|   		case SLAPCAT:
#  240|-> 			if ( strcasecmp( p, "no" ) == 0 ) {
#  241|   				ldif_wrap = LDIF_LINE_WIDTH_MAX;
#  242|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1155]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapdn.c: scope_hint: In function ‘slapdn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapdn.c:82:33: warning[-Wanalyzer-null-argument]: use of NULL ‘pdn.bv_val’ where non-null expected
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapdn.c:36: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapdn.c:80:34: note: in expansion of macro ‘dn_mode’
<built-in>: note: argument 1 of ‘__builtin_puts’ must be non-null
#   80|   			switch ( dn_mode ) {
#   81|   			case SLAP_TOOL_LDAPDN_PRETTY:
#   82|-> 				printf( "%s\n", pdn.bv_val );
#   83|   				break;
#   84|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1156]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapdn.c:86:33: warning[-Wanalyzer-null-argument]: use of NULL ‘ndn.bv_val’ where non-null expected
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapdn.c:80:34: note: in expansion of macro ‘dn_mode’
<built-in>: note: argument 1 of ‘__builtin_puts’ must be non-null
#   84|   
#   85|   			case SLAP_TOOL_LDAPDN_NORMAL:
#   86|-> 				printf( "%s\n", ndn.bv_val );
#   87|   				break;
#   88|   

Error: CPPCHECK_WARNING: [#def1157]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/plugin.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1158]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/plugin.c: scope_hint: In function ‘slapi_int_register_plugin_index’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/plugin.c:171:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pSavePB’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/assert.h:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/portable.h:1192: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/plugin.c:23: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/plugin.c:33: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/plugin.c:160:18: note: in expansion of macro ‘SLAPI_BACKEND_PBLOCK’
#  169|   
#  170|   		if ( rc == LDAP_SUCCESS ) { 
#  171|-> 			rc = slapi_pblock_set( pSavePB, SLAPI_IBM_PBLOCK, (void *)pPB ); 
#  172|   		}
#  173|   	}

Error: COMPILER_WARNING (CWE-457): [#def1159]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/plugin.c: scope_hint: In function ‘slapi_int_register_plugin_index’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/plugin.c:171:30: warning[-Wmaybe-uninitialized]: ‘pSavePB’ may be used uninitialized
#  171 |                         rc = slapi_pblock_set( pSavePB, SLAPI_IBM_PBLOCK, (void *)pPB );
#      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/plugin.c:155:26: note: ‘pSavePB’ was declared here
#  155 |         Slapi_PBlock    *pSavePB;
#      |                          ^~~~~~~
#  169|   
#  170|   		if ( rc == LDAP_SUCCESS ) { 
#  171|-> 			rc = slapi_pblock_set( pSavePB, SLAPI_IBM_PBLOCK, (void *)pPB ); 
#  172|   		}
#  173|   	}

Error: COMPILER_WARNING (CWE-252): [#def1160]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/printmsg.c: scope_hint: In function ‘slapi_int_log_error’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/printmsg.c:107:17: warning[-Wunused-result]: ignoring return value of ‘lockf’ declared with attribute ‘warn_unused_result’
#  107 |                 lockf( fileno( fp ), F_ULOCK, 0 );
#      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  105|   		UnlockFile( fhandle, 0, 0, UINT_MAX, UINT_MAX );
#  106|   #else
#  107|-> 		lockf( fileno( fp ), F_ULOCK, 0 );
#  108|   #endif
#  109|   

Error: CPPCHECK_WARNING: [#def1161]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/slapi_overlay.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def1162]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/slapi_overlay.c:791:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  789|   	if ( target != NULL && dn_match( &target->e_nname, gr_ndn ) ) {
#  790|   		e = target;
#  791|-> 		rc = 0;
#  792|   	} else {
#  793|   		rc = be_entry_get_rw( op, gr_ndn, group_oc, group_at, 0, &e );

Error: CLANG_WARNING: [#def1163]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/slapi_overlay.c:793:3: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  791|   		rc = 0;
#  792|   	} else {
#  793|-> 		rc = be_entry_get_rw( op, gr_ndn, group_oc, group_at, 0, &e );
#  794|   	}
#  795|   	if ( e != NULL ) {

Error: CPPCHECK_WARNING: [#def1164]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/slapi_pblock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1165]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/slapi_utils.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def1166]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/slapi_utils.c:2906: error[legacyUninitvar]: Uninitialized variable: tmpPlugin
# 2904|   	slapi_compute_callback_t *pGetPlugin, *tmpPlugin;
# 2905|   
# 2906|-> 	rc = slapi_int_get_plugins( frontendDB, SLAPI_PLUGIN_COMPUTE_EVALUATOR_FN, (SLAPI_FUNC **)&tmpPlugin );
# 2907|   	if ( rc != LDAP_SUCCESS || tmpPlugin == NULL ) {
# 2908|   		/* Nothing to do; front-end should ignore. */

Error: COMPILER_WARNING: [#def1167]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: COMPILER_WARNING: [#def1168]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapi/version.c:19:19: warning[-Wunused-const-variable=]: ‘__Version’ defined but not used
#   19 | static const char __Version[] =
#      |                   ^~~~~~~~~
#   17|   "COPYING RESTRICTIONS APPLY\n";
#   18|   
#   19|-> static const char __Version[] =
#   20|   "@(#) $OpenLDAP: libslapi.la 2.6.8 (" __DATE__ " " __TIME__ ") $\n"
#   21|   "\topenldap\n";

Error: CPPCHECK_WARNING: [#def1169]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapindex.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1170]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def1171]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:61:13: warning[-Wunused-but-set-variable]: variable ‘checkvals’ set but not used
#   61 |         int checkvals, ldifrc;
#      |             ^~~~~~~~~
#   59|   	Operation *op;
#   60|   
#   61|-> 	int checkvals, ldifrc;
#   62|   	unsigned long lineno, nextline;
#   63|   	int lmax;

Error: CLANG_WARNING: [#def1172]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:98:2: warning[deadcode.DeadStores]: Value stored to 'checkvals' is never read
#   96|   	}
#   97|   
#   98|-> 	checkvals = (slapMode & SLAP_TOOL_QUICK) ? 0 : 1;
#   99|   
#  100|   	lmax = 0;

Error: COMPILER_WARNING (CWE-563): [#def1173]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:145:21: warning[-Wunused-but-set-variable]: variable ‘is_oc’ set but not used
#  145 |                 int is_oc = 0;
#      |                     ^~~~~
#  143|   		struct berval ndn = BER_BVNULL;
#  144|   		int n;
#  145|-> 		int is_oc = 0;
#  146|   		int local_rc;
#  147|   		int mod_err = 0;

Error: COMPILER_WARNING (CWE-563): [#def1174]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c: scope_hint: In function ‘slapmodify’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:147:21: warning[-Wunused-variable]: unused variable ‘mod_err’
#  147 |                 int mod_err = 0;
#      |                     ^~~~~~~
#  145|   		int is_oc = 0;
#  146|   		int local_rc;
#  147|-> 		int mod_err = 0;
#  148|   		char *request = "(unknown)";
#  149|   

Error: CLANG_WARNING: [#def1175]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:148:9: warning[deadcode.DeadStores]: Value stored to 'request' during its initialization is never read
#  146|   		int local_rc;
#  147|   		int mod_err = 0;
#  148|-> 		char *request = "(unknown)";
#  149|   
#  150|   		ber_str2bv( buf, 0, 0, &rbuf );

Error: CLANG_WARNING: [#def1176]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:384:18: warning[core.NullDereference]: Dereference of null pointer
#  382|   					if ( local_rc != LDAP_SUCCESS ) {
#  383|   						fprintf( stderr, "%s: DN=\"%s\": unable to %s attr=%s value #%d\n",
#  384|-> 							progname, e->e_dn, pretty ? "prettify" : "validate",
#  385|   							mods.sm_desc->ad_cname.bv_val, i );
#  386|   						/* handle error */

Error: CLANG_WARNING: [#def1177]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:406:19: warning[core.NullDereference]: Dereference of null pointer
#  404|   						if ( local_rc != LDAP_SUCCESS ) {
#  405|   							fprintf( stderr, "%s: DN=\"%s\": unable to normalize attr=%s value #%d\n",
#  406|-> 								progname, e->e_dn, mods.sm_desc->ad_cname.bv_val, i );
#  407|   							/* handle error */
#  408|   							rc = EXIT_FAILURE;

Error: CLANG_WARNING: [#def1178]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:420:6: warning[deadcode.DeadStores]: Value stored to 'is_oc' is never read
#  418|   
#  419|   				if ( mods.sm_desc == slap_schema.si_ad_objectClass ) {
#  420|-> 					is_oc = 1;
#  421|   				}
#  422|   

Error: CLANG_WARNING: [#def1179]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:450:17: warning[core.NullDereference]: Dereference of null pointer
#  448|   				if ( local_rc != LDAP_SUCCESS ) {
#  449|   					fprintf( stderr, "%s: DN=\"%s\": unable to modify attr=%s\n",
#  450|-> 						progname, e->e_dn, mods.sm_desc->ad_cname.bv_val );
#  451|   					rc = EXIT_FAILURE;
#  452|   					goto cleanup;

Error: CLANG_WARNING: [#def1180]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:595:5: warning[core.CallAndMessage]: 5th function call argument is an uninitialized value
#  593|   
#  594|   			if ( verbose )
#  595|-> 				fprintf( stderr, "%s: \"%s\" (%08lx)\n",
#  596|   					request, ndn.bv_val, (long) id );
#  597|   		} else {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1181]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c: scope_hint: In function ‘slapmodify’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:595:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘id’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:54: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapcommon.h:21: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:39: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:215:21: note: in expansion of macro ‘BER_BVISEMPTY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:51: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:302:25: note: in expansion of macro ‘lrop_mods’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:1896:51: note: in definition of macro ‘SLAP_DBFLAGS’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:1898:51: note: in expansion of macro ‘SLAP_NOLASTMOD’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:463:22: note: in expansion of macro ‘SLAP_LASTMOD’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:463:35: note: in expansion of macro ‘be’
#  593|   
#  594|   			if ( verbose )
#  595|-> 				fprintf( stderr, "%s: \"%s\" (%08lx)\n",
#  596|   					request, ndn.bv_val, (long) id );
#  597|   		} else {

Error: COMPILER_WARNING (CWE-457): [#def1182]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:595:33: warning[-Wmaybe-uninitialized]: ‘id’ may be used uninitialized
#  595 |                                 fprintf( stderr, "%s: \"%s\" (%08lx)\n",
#      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  596 |                                         request, ndn.bv_val, (long) id );
#      |                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:57:12: note: ‘id’ was declared here
#   57 |         ID id;
#      |            ^~
#  593|   
#  594|   			if ( verbose )
#  595|-> 				fprintf( stderr, "%s: \"%s\" (%08lx)\n",
#  596|   					request, ndn.bv_val, (long) id );
#  597|   		} else {

Error: CLANG_WARNING: [#def1183]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:624:8: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  622|   
#  623|   	if ( rc == EXIT_SUCCESS ) {
#  624|-> 		rc = slap_tool_update_ctxcsn( progname, sid, &bvtext );
#  625|   	}
#  626|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1184]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:624:22: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘sid’
#  622|   
#  623|   	if ( rc == EXIT_SUCCESS ) {
#  624|-> 		rc = slap_tool_update_ctxcsn( progname, sid, &bvtext );
#  625|   	}
#  626|   

Error: COMPILER_WARNING (CWE-457): [#def1185]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:624:22: warning[-Wmaybe-uninitialized]: ‘sid’ may be used uninitialized
#  624 |                 rc = slap_tool_update_ctxcsn( progname, sid, &bvtext );
#      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapmodify.c:55:23: note: ‘sid’ was declared here
#   55 |         unsigned long sid;
#      |                       ^~~
#  622|   
#  623|   	if ( rc == EXIT_SUCCESS ) {
#  624|-> 		rc = slap_tool_update_ctxcsn( progname, sid, &bvtext );
#  625|   	}
#  626|   

Error: CPPCHECK_WARNING: [#def1186]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slapschema.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1187]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/str2filter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def1188]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/str2filter.c:65:2: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#   63|   	ber_reset( ber, 1 );
#   64|   
#   65|-> 	rc = get_filter( op, ber, &f, &text );
#   66|   
#   67|   done:

Error: CPPCHECK_WARNING: [#def1189]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1190]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c: scope_hint: In function ‘init_syncrepl’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:443:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘attrs’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:54: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:27: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:7229:14: note: in expansion of macro ‘BER_BVISEMPTY’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/slap.h:1900:50: note: in expansion of macro ‘SLAP_DBFLAGS’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:7307:31: note: in expansion of macro ‘SLAP_DBHIDDEN’
#  441|   			attrs[i++] = ch_strdup( sync_descs[0]->ad_cname.bv_val );
#  442|   		}
#  443|-> 		attrs[i] = NULL;
#  444|   	}
#  445|   

Error: COMPILER_WARNING (CWE-563): [#def1191]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c: scope_hint: In function ‘check_syncprov’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:928:16: warning[-Wunused-variable]: unused variable ‘j’
#  928 |         int i, j, changed = 0;
#      |                ^
#  926|   	Entry e = {0};
#  927|   	SlapReply rs = {REP_SEARCH};
#  928|-> 	int i, j, changed = 0;
#  929|   
#  930|   	/* Look for contextCSN from syncprov overlay. If

Error: COMPILER_WARNING (CWE-457): [#def1192]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:1378:46: warning[-Wmaybe-uninitialized]: ‘entry’ may be used uninitialized
# 1378 |                                         rc = syncrepl_entry( si, op, entry, &modlist, syncstate, syncUUID, NULL );
#      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c: scope_hint: In function ‘do_syncrepl’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:1363:42: note: ‘entry’ declared here
# 1363 |                 Entry                   *entry;
#      |                                          ^~~~~
# 1376|   				rc = syncrepl_dirsync_message( si, op, msg, &modlist, &entry, &syncstate, syncUUID );
# 1377|   				if ( rc == 0 )
# 1378|-> 					rc = syncrepl_entry( si, op, entry, &modlist, syncstate, syncUUID, NULL );
# 1379|   				op->o_tmpfree( syncUUID[0].bv_val, op->o_tmpmemctx );
# 1380|   				if ( modlist )

Error: CPPCHECK_WARNING (CWE-562): [#def1193]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3205: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3203|   	}
# 3204|   
# 3205|-> 	op->o_callback = &cb;
# 3206|   	slap_op_time( &op->o_time, &op->o_tincr );
# 3207|   

Error: CPPCHECK_WARNING (CWE-562): [#def1194]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:3886: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 3884|   		cb.sc_private = si;
# 3885|   
# 3886|-> 		op->o_callback = &cb;
# 3887|   		op->o_req_dn = si->si_contextdn;
# 3888|   		op->o_req_ndn = si->si_contextdn;

Error: CPPCHECK_WARNING (CWE-562): [#def1195]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4199: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4197|   
# 4198|   	/* set callback function */
# 4199|-> 	op->o_callback = &cb;
# 4200|   	cb.sc_response = dn_callback;
# 4201|   	cb.sc_private = &dni;

Error: CPPCHECK_WARNING (CWE-562): [#def1196]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4659: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4657|   					op->o_req_dn = pdn;
# 4658|   					op->o_req_ndn = pdn;
# 4659|-> 					op->o_callback = &cb;
# 4660|   					rs_reinit( &rs_delete, REP_RESULT );
# 4661|   					op->o_bd->be_delete( op, &rs_delete );

Error: CPPCHECK_WARNING (CWE-562): [#def1197]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4736: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4734|   	cb.sc_private = si;
# 4735|   
# 4736|-> 	op->o_callback = &cb;
# 4737|   	op->o_tag = LDAP_REQ_SEARCH;
# 4738|   	op->ors_scope = si->si_scope;

Error: COMPILER_WARNING (CWE-563): [#def1198]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c: scope_hint: In function ‘syncrepl_del_nonpresent’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4774:25: warning[-Wunused-but-set-variable]: variable ‘cf’ set but not used
# 4774 |                 Filter *cf, *of;
#      |                         ^~
# 4772|   		si->si_refreshDelete ^= NP_DELETE_ONE;
# 4773|   	} else {
# 4774|-> 		Filter *cf, *of;
# 4775|   		Filter mmf[2];
# 4776|   		AttributeAssertion mmaa;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1199]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4825:40: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘of’
# 4823|   		rc = be->be_search( op, &rs_search );
# 4824|   		if ( SLAP_MULTIPROVIDER( op->o_bd )) {
# 4825|-> 			op->ors_filter = of;
# 4826|   		}
# 4827|   		if ( op->ors_filter ) filter_free_x( op, op->ors_filter, 1 );

Error: COMPILER_WARNING (CWE-457): [#def1200]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c: scope_hint: In function ‘syncrepl_del_nonpresent’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4825:40: warning[-Wmaybe-uninitialized]: ‘of’ may be used uninitialized
# 4825 |                         op->ors_filter = of;
#      |                         ~~~~~~~~~~~~~~~^~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4774:30: note: ‘of’ was declared here
# 4774 |                 Filter *cf, *of;
#      |                              ^~
# 4823|   		rc = be->be_search( op, &rs_search );
# 4824|   		if ( SLAP_MULTIPROVIDER( op->o_bd )) {
# 4825|-> 			op->ors_filter = of;
# 4826|   		}
# 4827|   		if ( op->ors_filter ) filter_free_x( op, op->ors_filter, 1 );

Error: CPPCHECK_WARNING (CWE-562): [#def1201]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4860: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4858|   			np_list = LDAP_LIST_NEXT( np_list, npe_link );
# 4859|   			op->o_tag = LDAP_REQ_DELETE;
# 4860|-> 			op->o_callback = &cb;
# 4861|   			cb.sc_response = syncrepl_null_callback;
# 4862|   			cb.sc_private = si;

Error: CPPCHECK_WARNING (CWE-562): [#def1202]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4918: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4916|   					op->o_req_dn = pdn;
# 4917|   					op->o_req_ndn = pdn;
# 4918|-> 					op->o_callback = &cb;
# 4919|   					rs_reinit( &rs_delete, REP_RESULT );
# 4920|   					/* give it a root privil ? */

Error: CPPCHECK_WARNING (CWE-562): [#def1203]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4966: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 4964|   
# 4965|   	op->o_tag = LDAP_REQ_ADD;
# 4966|-> 	op->o_callback = &cb;
# 4967|   	cb.sc_response = syncrepl_null_callback;
# 4968|   	cb.sc_private = NULL;

Error: COMPILER_WARNING: [#def1204]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c: scope_hint: In function ‘syncrepl_add_glue_ancestors’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4966:24: warning[-Wdangling-pointer=]: storing the address of local variable ‘cb’ in ‘op_111(D)->o_callback’
# 4966 |         op->o_callback = &cb;
#      |         ~~~~~~~~~~~~~~~^~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4954:23: note: ‘cb’ declared here
# 4954 |         slap_callback cb = { NULL };
#      |                       ^~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:4950:20: note: ‘op’ declared here
# 4950 |         Operation* op,
#      |         ~~~~~~~~~~~^~
# 4964|   
# 4965|   	op->o_tag = LDAP_REQ_ADD;
# 4966|-> 	op->o_callback = &cb;
# 4967|   	cb.sc_response = syncrepl_null_callback;
# 4968|   	cb.sc_private = NULL;

Error: CPPCHECK_WARNING (CWE-562): [#def1205]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:5108: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5106|   
# 5107|   	op->o_tag = LDAP_REQ_ADD;
# 5108|-> 	op->o_callback = &cb;
# 5109|   	cb.sc_response = syncrepl_null_callback;
# 5110|   	cb.sc_private = NULL;

Error: COMPILER_WARNING (CWE-563): [#def1206]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c: scope_hint: In function ‘syncrepl_dsee_update’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:5134:23: warning[-Wunused-variable]: unused variable ‘first’
# 5134 |         struct berval first = BER_BVNULL;
#      |                       ^~~~~
# 5132|   	Backend *be = op->o_bd;
# 5133|   	Modifications mod;
# 5134|-> 	struct berval first = BER_BVNULL;
# 5135|   	slap_callback cb = { NULL };
# 5136|   	SlapReply	rs_modify = {REP_RESULT};

Error: CPPCHECK_WARNING (CWE-562): [#def1207]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:5163: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5161|   	cb.sc_private = si;
# 5162|   
# 5163|-> 	op->o_callback = &cb;
# 5164|   	op->o_req_dn = si->si_contextdn;
# 5165|   	op->o_req_ndn = si->si_contextdn;

Error: CPPCHECK_WARNING (CWE-562): [#def1208]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:5288: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 5286|   	cb.sc_private = si;
# 5287|   
# 5288|-> 	op->o_callback = &cb;
# 5289|   	op->o_req_dn = si->si_contextdn;
# 5290|   	op->o_req_ndn = si->si_contextdn;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1209]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c: scope_hint: In function ‘dn_callback’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:5802:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘is_ctx’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:5668:23: note: in expansion of macro ‘BER_BVISNULL’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:5732:45: note: in expansion of macro ‘sr_entry’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:5801:84: note: in expansion of macro ‘sr_entry’
# 5800|   				{
# 5801|   					Attribute *old = attrs_exdup( op, dni, rs->sr_entry->e_attrs );
# 5802|-> 					syncrepl_diff_entry( op, old,
# 5803|   						dni->new_entry->e_attrs, &dni->mods, dni->modlist,
# 5804|   						is_ctx );

Error: COMPILER_WARNING (CWE-457): [#def1210]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c: scope_hint: In function ‘dn_callback’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:5802:41: warning[-Wmaybe-uninitialized]: ‘is_ctx’ may be used uninitialized
# 5802 |                                         syncrepl_diff_entry( op, old,
#      |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 5803 |                                                 dni->new_entry->e_attrs, &dni->mods, dni->modlist,
#      |                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 5804 |                                                 is_ctx );
#      |                                                 ~~~~~~~~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:5683:37: note: ‘is_ctx’ was declared here
# 5683 |                                 int is_ctx, new_sup = 0;
#      |                                     ^~~~~~
# 5800|   				{
# 5801|   					Attribute *old = attrs_exdup( op, dni, rs->sr_entry->e_attrs );
# 5802|-> 					syncrepl_diff_entry( op, old,
# 5803|   						dni->new_entry->e_attrs, &dni->mods, dni->modlist,
# 5804|   						is_ctx );

Error: COMPILER_WARNING (CWE-563): [#def1211]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c: scope_hint: In function ‘syncrepl_monitor_add’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:7119:39: warning[-Wunused-variable]: unused variable ‘bv’
# 7119 |         struct berval pndn, pdn, rdn, bv;
#      |                                       ^~
# 7117|   	BackendInfo *mi;
# 7118|   	monitor_extra_t *mbe;
# 7119|-> 	struct berval pndn, pdn, rdn, bv;
# 7120|   	char rdnbuf[sizeof("cn=Consumer 999")];
# 7121|   	Entry *e, *p;

Error: CPPCHECK_WARNING (CWE-457): [#def1212]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syncrepl.c:7600: warning[uninitvar]: Uninitialized variable: *sip
# 7598|   			int i;
# 7599|   
# 7600|-> 			for ( sip = &c->be->be_syncinfo, i=0; *sip; i++ ) {
# 7601|   				si = *sip;
# 7602|   				if ( c->valx == -1 || i == c->valx ) {

Error: CPPCHECK_WARNING: [#def1213]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/syntax.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1214]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/txn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def1215]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/txn.c:368:2: warning[core.uninitialized.UndefReturn]: Undefined or garbage value returned to caller
#  366|   	ldap_pvt_thread_mutex_unlock( &c->c_mutex );
#  367|   
#  368|-> 	return rc;
#  369|   }
#  370|   

Error: COMPILER_WARNING (CWE-457): [#def1216]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/txn.c: scope_hint: In function ‘txn_end_extop’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/txn.c:368:16: warning[-Wmaybe-uninitialized]: ‘rc’ may be used uninitialized
#  368 |         return rc;
#      |                ^~
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/txn.c:156:13: note: ‘rc’ was declared here
#  156 |         int rc;
#      |             ^~
#  366|   	ldap_pvt_thread_mutex_unlock( &c->c_mutex );
#  367|   
#  368|-> 	return rc;
#  369|   }
#  370|   

Error: CPPCHECK_WARNING: [#def1217]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/user.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1218]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/value.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1219]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/verbs.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def1220]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/servers/slapd/version.c:15:19: warning[-Wunused-const-variable=]: ‘copyright’ defined but not used
#   15 | static const char copyright[] =
#      |                   ^~~~~~~~~
#   13|    */
#   14|   
#   15|-> static const char copyright[] =
#   16|   "Copyright 1998-2024 The OpenLDAP Foundation.  All rights reserved.\n"
#   17|   "COPYING RESTRICTIONS APPLY\n";

Error: CPPCHECK_WARNING: [#def1221]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/ldif-filter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def1222]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/ldif-filter.c:114:2: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  112|   sort_strings( Strings *ss, size_t offset )
#  113|   {
#  114|-> 	qsort( ss->val + offset, ss->len - offset, sizeof(*ss->val), cmp );
#  115|   }
#  116|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1223]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/ldif-filter.c: scope_hint: In function ‘sort_strings’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/ldif-filter.c:114:9: warning[-Wanalyzer-null-argument]: use of NULL ‘ss.val’ where non-null expected
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/include/ac/stdlib.h:26: included_from: Included from here.
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/ldif-filter.c:21: included_from: Included from here.
/usr/include/stdlib.h:970:13: note: argument 1 of ‘qsort’ must be non-null
#  112|   sort_strings( Strings *ss, size_t offset )
#  113|   {
#  114|-> 	qsort( ss->val + offset, ss->len - offset, sizeof(*ss->val), cmp );
#  115|   }
#  116|   

Error: CPPCHECK_WARNING: [#def1224]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-addel.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-1164): [#def1225]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-addel.c:40:1: warning[-Wunused-function]: ‘get_add_entry’ declared ‘static’ but never defined
#   40 | get_add_entry( char *filename );
#      | ^~~~~~~~~~~~~
#   38|   
#   39|   static LDIFRecord *
#   40|-> get_add_entry( char *filename );
#   41|   
#   42|   static void

Error: COMPILER_WARNING (CWE-1164): [#def1226]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-addel.c:142:1: warning[-Wunused-function]: ‘addmodifyop’ defined but not used
#  142 | addmodifyop( LDAPMod ***pmodsp, int modop, char *attr, char *value, int vlen )
#      | ^~~~~~~~~~~
#  140|   
#  141|   static void
#  142|-> addmodifyop( LDAPMod ***pmodsp, int modop, char *attr, char *value, int vlen )
#  143|   {
#  144|       LDAPMod		**pmods;

Error: CPPCHECK_WARNING: [#def1227]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-bind.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def1228]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-bind.c:402:12: warning[deadcode.DeadStores]: Although the value stored to 'rc' is used in the enclosing expression, the value is never actually read from 'rc'
#  400|   	}
#  401|   
#  402|-> 	while ( ( rc = ldap_result( ld, LDAP_RES_ANY, LDAP_MSG_ONE, NULL, &res ) ) > 0 )
#  403|   	{
#  404|   		BerElement *ber;

Error: CLANG_WARNING: [#def1229]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-bind.c:413:5: warning[deadcode.DeadStores]: Value stored to 'rc' is never read
#  411|   			switch ( ldap_msgtype( msg ) ) {
#  412|   			case LDAP_RES_SEARCH_ENTRY:
#  413|-> 				rc = ldap_get_dn_ber( ld, msg, &ber, &bv );
#  414|   				dns = realloc( dns, (ndns + 1)*sizeof(char *) );
#  415|   				if ( !dns ) {

Error: GCC_ANALYZER_WARNING (CWE-415): [#def1230]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-bind.c: scope_hint: In function ‘do_base’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-bind.c:423:49: warning[-Wanalyzer-double-free]: double-‘free’ of ‘creds’
#  421|   					struct berval	**values = ldap_get_values_len( ld, msg, pwattr );
#  422|   
#  423|-> 					creds = realloc( creds, (ndns + 1)*sizeof(struct berval) );
#  424|   					if ( !creds ) {
#  425|   						tester_error( "realloc failed" );

Error: CPPCHECK_WARNING: [#def1231]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-common.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-457): [#def1232]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-common.c: scope_hint: In function ‘tester_init_ld’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-common.c:478:13: warning[-Wmaybe-uninitialized]: ‘rc’ may be used uninitialized
#  478 |         int rc, do_retry = config->retries;
#      |             ^~
#  476|   {
#  477|   	LDAP *ld;
#  478|-> 	int rc, do_retry = config->retries;
#  479|   	int version = LDAP_VERSION3;
#  480|   

Error: CLANG_WARNING: [#def1233]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-common.c:523:11: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value
#  521|   		}
#  522|   
#  523|-> 		if ( rc != LDAP_SUCCESS ) {
#  524|   			tester_ldap_error( ld, "ldap_sasl_bind_s", NULL );
#  525|   			ldap_unbind_ext( ld, NULL, NULL );

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1234]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-common.c: scope_hint: In function ‘tester_init_ld’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-common.c:523:20: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘rc’
#  521|   		}
#  522|   
#  523|-> 		if ( rc != LDAP_SUCCESS ) {
#  524|   			tester_ldap_error( ld, "ldap_sasl_bind_s", NULL );
#  525|   			ldap_unbind_ext( ld, NULL, NULL );

Error: CPPCHECK_WARNING: [#def1235]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-modify.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def1236]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-modrdn.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1237]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-modrdn.c: scope_hint: In function ‘do_modrdn’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-modrdn.c:137:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p2’
#  135|   	p2 = strchr( p1, ',' );
#  136|   
#  137|-> 	*p2 = '\0';
#  138|   	rdns[1] = strdup( entry );
#  139|   	if ( rdns[1] == NULL ) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1238]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-modrdn.c:139:12: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(entry)’
#  137|   	*p2 = '\0';
#  138|   	rdns[1] = strdup( entry );
#  139|-> 	if ( rdns[1] == NULL ) {
#  140|   		tester_error( "strdup failed" );
#  141|   		exit( EXIT_FAILURE );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1239]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-modrdn.c:148:15: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(entry)’
#  146|   		DNs[1][i++] = *p2--;
#  147|   	
#  148|-> 	DNs[1][i] = '\0';
#  149|   	rdns[0] = strdup( DNs[1] );
#  150|   	if ( rdns[0] == NULL ) {

Error: CPPCHECK_WARNING: [#def1240]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-mtread.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def1241]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-mtread.c:128:50: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 8191 bytes into a region of size 8177
#  128 |         snprintf(thrstr, BUFSIZ, "tidx: %d says: %s", idx, string);
#      |                                                  ^~
#......
#  277 |                 thread_verbose(-1, outstr);
#      |                                    ~~~~~~         
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 16 and 8207 bytes into a destination of size 8192
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  126|   	if (!verbose)
#  127|   		return;
#  128|-> 	snprintf(thrstr, BUFSIZ, "tidx: %d says: %s", idx, string);
#  129|   	tester_error( thrstr );
#  130|   }

Error: COMPILER_WARNING: [#def1242]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-mtread.c: scope_hint: In function ‘do_read.isra.0’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-mtread.c:128:50: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 8191 bytes into a region of size between 8168 and 8178
#  128 |         snprintf(thrstr, BUFSIZ, "tidx: %d says: %s", idx, string);
#      |                                                  ^~
#......
#  666 |                 thread_verbose( idx, thrstr );
#      |                                      ~~~~~~       
/usr/include/bits/stdio2.h:68:10: note: ‘__snprintf_chk’ output between 15 and 8216 bytes into a destination of size 8192
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  126|   	if (!verbose)
#  127|   		return;
#  128|-> 	snprintf(thrstr, BUFSIZ, "tidx: %d says: %s", idx, string);
#  129|   	tester_error( thrstr );
#  130|   }

Error: COMPILER_WARNING (CWE-563): [#def1243]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-mtread.c:162:26: warning[-Wunused-variable]: unused variable ‘manager’
#  162 |         char            *manager = NULL;
#      |                          ^~~~~~~
#  160|   	int		i;
#  161|   	char		*uri = NULL;
#  162|-> 	char		*manager = NULL;
#  163|   	struct berval	passwd = { 0, NULL };
#  164|   	char		outstr[BUFSIZ];

Error: COMPILER_WARNING (CWE-563): [#def1244]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-mtread.c: scope_hint: In function ‘main’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-mtread.c:163:25: warning[-Wunused-variable]: unused variable ‘passwd’
#  163 |         struct berval   passwd = { 0, NULL };
#      |                         ^~~~~~
#  161|   	char		*uri = NULL;
#  162|   	char		*manager = NULL;
#  163|-> 	struct berval	passwd = { 0, NULL };
#  164|   	char		outstr[BUFSIZ];
#  165|   	int		ptpass;

Error: COMPILER_WARNING: [#def1245]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-mtread.c: scope_hint: In function ‘main’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-mtread.c:268:61: warning[-Wformat-truncation=]: ‘%s’ directive argument is null
#  268 |         snprintf(outstr, BUFSIZ, "MT Test Start: conns: %d (%s)", noconns, uri);
#      |                                                             ^~
#  266|   	}
#  267|   
#  268|-> 	snprintf(outstr, BUFSIZ, "MT Test Start: conns: %d (%s)", noconns, uri);
#  269|   	tester_error(outstr);
#  270|   	snprintf(outstr, BUFSIZ, "Threads: RO: %d RW: %d", threads, rwthreads);

Error: CLANG_WARNING: [#def1246]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-mtread.c:562:18: warning[core.UndefinedBinaryOperatorResult]: The left operand of '!=' is a garbage value
#  560|   		}
#  561|   		for( i = 0; i < nvalues; i++) {
#  562|-> 			if (values[i] != NULL)
#  563|   				ldap_memfree( values[i] );
#  564|   		}

Error: CPPCHECK_WARNING: [#def1247]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-read.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def1248]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-read.c:352:11: warning[core.NullDereference]: Array access (from variable 'msgids') results in a null pointer dereference
#  350|   				/* linear search, bah */
#  351|   				for ( j = 0; j < i; j++ ) {
#  352|-> 					if ( msgids[ j ] == msgid ) {
#  353|   						msgids[ j ] = -1;
#  354|   						active--;

Error: CPPCHECK_WARNING: [#def1249]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-search.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1250]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-search.c: scope_hint: In function ‘do_random’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-search.c:230:36: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
#  228|   
#  229|   				values = realloc( values, ( nvalues + n + 1 )*sizeof( char * ) );
#  230|-> 				if ( !values ) {
#  231|   					tester_error( "realloc failed" );
#  232|   					exit( EXIT_FAILURE );

Error: CLANG_WARNING: [#def1251]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-search.c:399:11: warning[core.NullDereference]: Array access (from variable 'msgids') results in a null pointer dereference
#  397|   				/* linear search, bah */
#  398|   				for ( j = 0; j < i; j++ ) {
#  399|-> 					if ( msgids[ j ] == msgid ) {
#  400|   						msgids[ j ] = -1;
#  401|   						active--;

Error: CPPCHECK_WARNING: [#def1252]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-tester.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1253]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-tester.c:235:48: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 16)’
#  233|   			for ( p = b; p[0]; p++ ) {
#  234|   				*epp = calloc( 1, sizeof( extra_t ) );
#  235|-> 				(*epp)->action = p[0];
#  236|   				epp = &(*epp)->next;
#  237|   				nextra++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1254]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-tester.c: scope_hint: In function ‘main’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-tester.c:235:48: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘extra’
#  233|   			for ( p = b; p[0]; p++ ) {
#  234|   				*epp = calloc( 1, sizeof( extra_t ) );
#  235|-> 				(*epp)->action = p[0];
#  236|   				epp = &(*epp)->next;
#  237|   				nextra++;

Error: COMPILER_WARNING (CWE-563): [#def1255]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-tester.c: scope_hint: In function ‘get_search_filters’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-tester.c:920:33: warning[-Wunused-but-set-variable]: variable ‘got_URL’ set but not used
#  920 |                         int     got_URL = 0;
#      |                                 ^~~~~~~
#  918|   		while (( filter < MAXREQS ) && ( fgets( line, BUFSIZ, fp ))) {
#  919|   			char	*nl;
#  920|-> 			int	got_URL = 0;
#  921|   
#  922|   			if (( nl = strchr( line, '\r' )) || ( nl = strchr( line, '\n' )))

Error: CLANG_WARNING: [#def1256]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-tester.c:930:5: warning[deadcode.DeadStores]: Value stored to 'got_URL' is never read
#  928|   				LDAPURLDesc	*lud;
#  929|   
#  930|-> 				got_URL = 1;
#  931|   				bases[filter] = NULL;
#  932|   				if ( ldap_url_parse( line, &lud ) != LDAP_URL_SUCCESS ) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1257]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-tester.c: scope_hint: In function ‘get_search_filters’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-tester.c:955:53: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*filters’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-tester.c:953:43: note: in expansion of macro ‘ArgDup’
#  953|   			filters[filter] = ArgDup( line );
#  954|   			if ( attrs ) {
#  955|-> 				if ( filters[filter][0] == '+') {
#  956|   					char	*sep = strchr( filters[filter], ':' );
#  957|   

Error: CLANG_WARNING: [#def1258]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-tester.c:1042:11: warning[deadcode.DeadStores]: Although the value stored to 'pid' is used in the enclosing expression, the value is never actually read from 'pid'
# 1040|   	wait4kids( maxkids );
# 1041|   
# 1042|-> 	switch ( pid = fork() ) {
# 1043|   	case 0:		/* child */
# 1044|   #ifdef HAVE_EBCDIC

Error: CPPCHECK_WARNING: [#def1259]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-watcher.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def1260]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-watcher.c:491:38: warning[core.NullDereference]: Dereference of null pointer
#  489|   							ber_bvreplace( &sv->monitorbase, &dn );
#  490|   							sv->flags |= HAS_ENTRIES;
#  491|-> 							sv->c_curr.entries = strtoul( bvals[0].bv_val, NULL, 0 );
#  492|   						}
#  493|   						ber_memfree( bvals );

Error: CLANG_WARNING: [#def1261]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-watcher.c:630:2: warning[deadcode.DeadStores]: Value stored to 'argc' is never read
#  628|   
#  629|   	argv += optind;
#  630|-> 	argc -= optind;
#  631|   	servers = calloc( numservers, sizeof(server));
#  632|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1262]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-watcher.c: scope_hint: In function ‘main’
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-watcher.c:644:48: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘servers’
#  642|   				servers[i].sid = atoi(sids[i]);
#  643|   			else
#  644|-> 				servers[i].sid = i+1;
#  645|   	}
#  646|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1263]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-watcher.c:648:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘servers’
#  646|   
#  647|   	for ( i = 0; i < numservers; i++ ) {
#  648|-> 		servers[i].url = argv[i];
#  649|   		servers[i].times = calloc( numservers, sizeof(activity));
#  650|   		servers[i].csn_curr.vals = calloc( numservers, sizeof(struct berval));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1264]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-watcher.c:668:41: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘msg1’
#  666|   		for (i=0; i<numservers; i++) {
#  667|   			if ( !servers[i].ld || !(servers[i].flags & WAS_LATE )) {
#  668|-> 				msg1[i] = 0;
#  669|   				msg2[i] = 0;
#  670|   			}

Error: CLANG_WARNING: [#def1265]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-watcher.c:678:47: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
#  676|   				if ( servers[i].flags & WAS_DOWN )
#  677|   					servers[i].flags ^= WAS_DOWN;
#  678|-> 				if (( servers[i].flags & HAS_MONITOR ) && !msg1[i] ) {
#  679|   					char *attrs[3] = { at_monitorOpCompleted.bv_val };
#  680|   					if ( servers[i].flags & HAS_ENTRIES )

Error: CLANG_WARNING: [#def1266]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-watcher.c:698:44: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
#  696|   					}
#  697|   				}
#  698|-> 				if (( servers[i].flags & HAS_BASE ) && !msg2[i] ) {
#  699|   					char *attrs[2] = { at_contextCSN.bv_val };
#  700|   					rc = ldap_search_ext( ld, cbase.bv_val,

Error: CLANG_WARNING: [#def1267]
openldap-2.6.8-build/openldap-2.6.8/openldap-2.6.8/tests/progs/slapd-watcher.c:764:9: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
#  762|   				ldap_msgfree( res );
#  763|   			}
#  764|-> 			if ( msg2[i] ) {
#  765|   				tv.tv_sec = 0;
#  766|   				tv.tv_usec = 250000;

Error: CPPCHECK_WARNING: [#def1268]
openldap-2.6.8-build/openldap-2.6.8/openldap-ppolicy-check-password-1.1/check_password.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING: [#def1269]
openldap-2.6.8-build/openldap-2.6.8/openldap-ppolicy-check-password-1.1/check_password.c: scope_hint: In function ‘chomp’
openldap-2.6.8-build/openldap-2.6.8/openldap-ppolicy-check-password-1.1/check_password.c:99:9: warning[-Wstringop-truncation]: ‘strncpy’ specified bound depends on the length of the source argument
#   99 |         strncpy (t,s,strlen(s)+1);
#      |         ^
openldap-2.6.8-build/openldap-2.6.8/openldap-ppolicy-check-password-1.1/check_password.c:99:22: note: length computed here
#   99 |         strncpy (t,s,strlen(s)+1);
#      |                      ^~~~~~~~~
#   97|   {
#   98|   	char* t = ber_memalloc(strlen(s)+1);
#   99|-> 	strncpy (t,s,strlen(s)+1);
#  100|   
#  101|   	if ( t[strlen(t)-1] == '\n' ) {

Error: CLANG_WARNING: [#def1270]
openldap-2.6.8-build/openldap-2.6.8/openldap-ppolicy-check-password-1.1/check_password.c:227:59: warning[deadcode.DeadStores]: Although the value stored to 'dealer' is used in the enclosing expression, the value is never actually read from 'dealer'
#  225|   			if ((word = strtok(start, " \t")) && (value = strtok(NULL, " \t"))) {
#  226|   				while ( keyWord != NULL ) {
#  227|-> 					if ((strncmp(keyWord,word,strlen(keyWord)) == 0) && (dealer = valid_word(word)) ) {
#  228|   
#  229|   #if defined(DEBUG)

Error: CLANG_WARNING: [#def1271]
openldap-2.6.8-build/openldap-2.6.8/openldap-ppolicy-check-password-1.1/check_password.c:292:3: warning[deadcode.DeadStores]: Value stored to 'mem_len' is never read
#  290|   	nLen = strlen (pPasswd);
#  291|   	if ( nLen < 6) {
#  292|-> 		mem_len = realloc_error_message(&szErrStr, mem_len,
#  293|   						strlen(PASSWORD_TOO_SHORT_SZ) +
#  294|   						strlen(pEntry->e_name.bv_val) + 1);

Error: CLANG_WARNING: [#def1272]
openldap-2.6.8-build/openldap-2.6.8/openldap-ppolicy-check-password-1.1/check_password.c:374:3: warning[deadcode.DeadStores]: Value stored to 'mem_len' is never read
#  372|   		(nQuality < minQuality)
#  373|   		) {
#  374|-> 		mem_len = realloc_error_message(&szErrStr, mem_len,
#  375|   						strlen(PASSWORD_QUALITY_SZ) +
#  376|   						strlen(pEntry->e_name.bv_val) + 2);

Error: CLANG_WARNING: [#def1273]
openldap-2.6.8-build/openldap-2.6.8/openldap-ppolicy-check-password-1.1/check_password.c:419:5: warning[deadcode.DeadStores]: Value stored to 'mem_len' is never read
#  417|   			r = (char *) FascistCheck (pPasswd, CRACKLIB_DICTPATH);
#  418|   			if ( r != NULL ) {
#  419|-> 				mem_len = realloc_error_message(&szErrStr, mem_len,
#  420|   								strlen(BAD_PASSWORD_SZ) +
#  421|   								strlen(pEntry->e_name.bv_val) +

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-163.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-nameopenldap-2.6.8-3.fc41
store-results-to/tmp/tmpbcxj_pun/openldap-2.6.8-3.fc41.tar.xz
time-created2024-07-03 16:34:38
time-finished2024-07-03 16:41:39
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpbcxj_pun/openldap-2.6.8-3.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpbcxj_pun/openldap-2.6.8-3.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9