Skip to content

Commit 07dfd85

Browse files
committed
zcore: resolve 1 instance of -Wuninitialized
clang reports: ``` exch/zcore/common_util.cpp:1173:15: warning: variable 'b_partial' is uninitialized when used here [-Wuninitialized] 1173 | b_result = !b_partial ? TRUE : false; ``` No ill effect because the result has traditionally been ignored anyway. Fixes: gromox-0~666 Fixes: gromox-3.0-62-gdca216dbd
1 parent 996493e commit 07dfd85

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

exch/zcore/common_util.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1066,9 +1066,7 @@ ec_error_t cu_send_message(store_object *pstore, message_object *msg,
10661066
{
10671067
uint64_t message_id = msg->get_id();
10681068
void *pvalue;
1069-
BOOL b_result;
1070-
BOOL b_private;
1071-
BOOL b_partial;
1069+
BOOL b_private, b_partial = false;
10721070
int account_id;
10731071
uint64_t new_id;
10741072
uint64_t folder_id;
@@ -1162,15 +1160,14 @@ ec_error_t cu_send_message(store_object *pstore, message_object *msg,
11621160
if (!exmdb_client->clear_submit(pstore->get_dir(), message_id, false))
11631161
return ecWarnWithErrors;
11641162
if (!exmdb_client->movecopy_message(pstore->get_dir(), cpid,
1165-
message_id, folder_id, new_id, TRUE, &b_result))
1163+
message_id, folder_id, new_id, TRUE, &b_partial) || b_partial)
11661164
return ecWarnWithErrors;
11671165
return ecSuccess;
11681166
} else if (b_delete) {
11691167
const EID_ARRAY ids = {1, &message_id};
11701168
if (!exmdb_client->delete_messages(pstore->get_dir(), cpid,
1171-
nullptr, parent_id, &ids, TRUE, &b_result))
1169+
nullptr, parent_id, &ids, TRUE, &b_partial) || b_partial)
11721170
/* ignore */;
1173-
b_result = !b_partial ? TRUE : false;
11741171
return ecSuccess;
11751172
}
11761173
if (!exmdb_client->clear_submit(pstore->get_dir(), message_id, false))
@@ -1182,7 +1179,7 @@ ec_error_t cu_send_message(store_object *pstore, message_object *msg,
11821179

11831180
const EID_ARRAY ids = {1, &message_id};
11841181
if (!exmdb_client->movecopy_messages(pstore->get_dir(), cpid, false,
1185-
STORE_OWNER_GRANTED, parent_id, folder_id, false, &ids, &b_partial))
1182+
STORE_OWNER_GRANTED, parent_id, folder_id, false, &ids, &b_partial) || b_partial)
11861183
return ecWarnWithErrors;
11871184
return ecSuccess;
11881185
} catch (const std::bad_alloc &) {

0 commit comments

Comments
 (0)