summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-03-21 23:15:56 -0500
committerRich Megginson <rmeggins@redhat.com>2010-03-25 16:58:24 -0600
commit65e04b8d72fa0ebe8a4c8475c6bc26ac831f984f (patch)
tree4b1913f2600e39ab5eb50f01398e5943ff2773e3
parentc1d2e7461ac41f39f5f27f3d9dcd6084bb4435a5 (diff)
downloadds-65e04b8d72fa0ebe8a4c8475c6bc26ac831f984f.tar.gz
ds-65e04b8d72fa0ebe8a4c8475c6bc26ac831f984f.tar.xz
ds-65e04b8d72fa0ebe8a4c8475c6bc26ac831f984f.zip
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)
-rw-r--r--ldap/servers/plugins/replication/cl5_api.c4
-rw-r--r--ldap/servers/slapd/libglobs.c4
2 files changed, 5 insertions, 3 deletions
diff --git a/ldap/servers/plugins/replication/cl5_api.c b/ldap/servers/plugins/replication/cl5_api.c
index b468d328..b4ec5e45 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 89a3c793..dbeae654 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);