apache
"Misspelled struct field leads to compiler error The structure has a member const char * certtdb, but a pointer to this struct tries to dereference certdb, which obviously does not exist."
Bug fixed by commit 4202d5fee3e
| Type | UndeclaredIdentifier |
| Config | "APR_HAS_LDAP && APR_HAS_LDAP_NETSCAPE_SSL" (2nd degree) |
| Fix-in | code |
| Location | modules/experimental/ |
#include <stdio.h>
#ifdef APU_HAS_LDAP
char certtdb = 'A';
void util_ldap_connection_open()
{
#ifdef APU_HAS_LDAP_NETSCAPE_SSL
printf("%c", certdb); // ERROR: certdb undeclared
#endif
}
#endif
int main(void)
{
#ifdef APU_HAS_LDAP
util_ldap_connection_open();
#endif
return 0;
}
diff --git a/apache/simple/4202d5f.c b/apache/simple/4202d5f.c
--- a/apache/simple/4202d5f.c
+++ b/apache/simple/4202d5f.c
@@ -1,7 +1,7 @@
#include <stdio.h>
#ifdef APU_HAS_LDAP
-char certtdb = 'A';
+char certdb = 'A';
void util_ldap_connection_open()
{
. include/util_ldap.h:92: typedef struct util_ldap_connection_t . include/util_ldap.h:108: const char *certtdb; . call modules/experimental/util_ldap.c:241:util_ldap_connection_open() . // certdb != certtdb . ERROR modules/experimental/util_ldap.c:281: if (!ldc->certdb)