ldap/servers/plugins/replication/cl5_api.c | 4 +++-
ldap/servers/slapd/libglobs.c | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 65e04b8d72fa0ebe8a4c8475c6bc26ac831f984f
Author: Endi S. Dewata <edewata(a)redhat.com>
Date: Sun Mar 21 23:15:56 2010 -0500
Bug 455489 - Address compiler warnings about strict-aliasing rules
https://bugzilla.redhat.com/show_bug.cgi?id=455489
Resolves: bug 455489
Bug description: Address compiler warnings about strict-aliasing rules
Fix description: The codes that generate strict-aliasing warnings have
been changed.
Reviewed by: rmeggins (and pushed by)
diff --git a/ldap/servers/plugins/replication/cl5_api.c
b/ldap/servers/plugins/replication/cl5_api.c
index b468d32..b4ec5e4 100644
--- a/ldap/servers/plugins/replication/cl5_api.c
+++ b/ldap/servers/plugins/replication/cl5_api.c
@@ -4548,6 +4548,7 @@ static int _cl5WriteRUV (CL5DBFile *file, PRBool purge)
char csnStr [CSN_STRSIZE];
struct berval **vals;
DB_TXN *txnid = NULL;
+ char *buff;
if ((purge && file->purgeRUV == NULL) || (!purge && file->maxRUV
== NULL))
return CL5_SUCCESS;
@@ -4565,7 +4566,8 @@ static int _cl5WriteRUV (CL5DBFile *file, PRBool purge)
key.size = CSN_STRSIZE;
- rc = _cl5WriteBervals (vals, (char**)&data.data, &data.size);
+ rc = _cl5WriteBervals (vals, &buff, &data.size);
+ data.data = buff;
ber_bvecfree(vals);
if (rc != CL5_SUCCESS)
{
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
index 89a3c79..dbeae65 100644
--- a/ldap/servers/slapd/libglobs.c
+++ b/ldap/servers/slapd/libglobs.c
@@ -5796,9 +5796,9 @@ config_set_entry(Slapi_Entry *e)
if (needs_free && value) { /* assumes memory allocated by slapi_ch_Xalloc
*/
if (CONFIG_CHARRAY == cgas->config_var_type) {
- charray_free(*((char ***)value));
+ charray_free((char **)*value);
} else if (CONFIG_SPECIAL_REFERRALLIST == cgas->config_var_type) {
- ber_bvecfree(*((struct berval ***)value));
+ ber_bvecfree((struct berval **)*value);
} else if ((CONFIG_CONSTANT_INT != cgas->config_var_type) && /* do
not free constants */
(CONFIG_CONSTANT_STRING != cgas->config_var_type)) {
slapi_ch_free(value);