fc2009
From b1cc97c13bbbcaa6a3c217d285283203809fa90b Mon Sep 17 00:00:00 2001
fc2009
From: Thierry Bordaz <tbordaz@redhat.com>
fc2009
Date: Tue, 16 Oct 2018 10:49:29 +0200
fc2009
Subject: [PATCH] Ticket 49915 - fix compiler warnings
fc2009
fc2009
---
fc2009
 ldap/servers/slapd/back-ldbm/idl_new.c | 2 +-
fc2009
 ldap/servers/slapd/back-ldbm/index.c   | 6 +++---
fc2009
 2 files changed, 4 insertions(+), 4 deletions(-)
fc2009
fc2009
diff --git a/ldap/servers/slapd/back-ldbm/idl_new.c b/ldap/servers/slapd/back-ldbm/idl_new.c
fc2009
index 102265c47..81172f590 100644
fc2009
--- a/ldap/servers/slapd/back-ldbm/idl_new.c
fc2009
+++ b/ldap/servers/slapd/back-ldbm/idl_new.c
fc2009
@@ -379,7 +379,7 @@ idl_new_range_fetch(
fc2009
             bck_info.index = SLAPI_ATTR_PARENTID;
fc2009
             bck_info.key = "0";
fc2009
 
fc2009
-            if (rc = slapi_back_get_info(be, BACK_INFO_INDEX_KEY, (void **)&bck_info)) {
fc2009
+            if ((rc = slapi_back_get_info(be, BACK_INFO_INDEX_KEY, (void **)&bck_info))) {
fc2009
                 slapi_log_err(SLAPI_LOG_WARNING, "idl_new_range_fetch", "Total update: fail to retrieve suffix entryID, continue assuming it is the first entry\n");
fc2009
             }
fc2009
             if (bck_info.key_found) {
fc2009
diff --git a/ldap/servers/slapd/back-ldbm/index.c b/ldap/servers/slapd/back-ldbm/index.c
fc2009
index dea6e9a3e..f0b969ff4 100644
fc2009
--- a/ldap/servers/slapd/back-ldbm/index.c
fc2009
+++ b/ldap/servers/slapd/back-ldbm/index.c
fc2009
@@ -1262,7 +1262,7 @@ set_suffix_key(Slapi_Backend *be, struct _back_info_index_key *info)
fc2009
     /* Start a txn */
fc2009
     li = (struct ldbminfo *)be->be_database->plg_private;
fc2009
     dblayer_txn_init(li, &txn);
fc2009
-    if (rc = dblayer_txn_begin(be, txn.back_txn_txn, &txn)) {
fc2009
+    if ((rc = dblayer_txn_begin(be, txn.back_txn_txn, &txn))) {
fc2009
         slapi_log_err(SLAPI_LOG_ERR, "set_suffix_key", "Fail to update %s index with  %s/%d (key/ID): txn begin fails\n",
fc2009
                   info->index, info->key, info->id);
fc2009
         return rc;
fc2009
@@ -1272,7 +1272,7 @@ set_suffix_key(Slapi_Backend *be, struct _back_info_index_key *info)
fc2009
     sv_key[1] = NULL;
fc2009
     slapi_value_init_string(sv_key[0], info->key);
fc2009
 
fc2009
-    if (rc = index_addordel_values_sv(be, info->index, sv_key, NULL, info->id, BE_INDEX_ADD, &txn)) {
fc2009
+    if ((rc = index_addordel_values_sv(be, info->index, sv_key, NULL, info->id, BE_INDEX_ADD, &txn))) {
fc2009
         value_done(sv_key[0]);
fc2009
         dblayer_txn_abort(be, &txn);
fc2009
         slapi_log_err(SLAPI_LOG_ERR, "set_suffix_key", "Fail to update %s index with  %s/%d (key/ID): index_addordel_values_sv fails\n",
fc2009
@@ -1281,7 +1281,7 @@ set_suffix_key(Slapi_Backend *be, struct _back_info_index_key *info)
fc2009
     }
fc2009
 
fc2009
     value_done(sv_key[0]);
fc2009
-    if (rc = dblayer_txn_commit(be, &txn)) {
fc2009
+    if ((rc = dblayer_txn_commit(be, &txn))) {
fc2009
         slapi_log_err(SLAPI_LOG_ERR, "set_suffix_key", "Fail to update %s index with  %s/%d (key/ID): commit fails\n",
fc2009
                   info->index, info->key, info->id);
fc2009
         return rc;
fc2009
-- 
fc2009
2.17.2
fc2009