Skip to content

Commit 800c148

Browse files
author
cuiming_yewu
committed
auth:rectify a cmake compilation warning
rectify src/auth/cephx/CephxProtocol.cc 1 warning with the variable 'ch' Used before initialized auth/cephx/CephxProtocol.cc:595:57: warning: '*((void*)& ch +8)' may be used uninitialized in this function [-Wmaybe-uninitialized] msg.server_challenge_plus_one = ch.server_challenge + 1; ~~~~~~~~~~~~~~~~~~~~^~~ Signed-off-by: cuiming <[email protected]>
1 parent 980a0a4 commit 800c148

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/auth/cephx/CephxProtocol.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ bool CephXAuthorizer::add_challenge(CephContext *cct,
584584
auto p = challenge.begin();
585585
if (!p.end()) {
586586
std::string error;
587-
CephXAuthorizeChallenge ch;
587+
CephXAuthorizeChallenge ch{};
588588
decode_decrypt_enc_bl(cct, ch, session_key, challenge, error);
589589
if (!error.empty()) {
590590
ldout(cct, 0) << "failed to decrypt challenge (" << challenge.length() << " bytes): "

0 commit comments

Comments
 (0)