Project

General

Profile

Cleanup #52752

fix warnings

Added by Deepika Upadhyay over 2 years ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

33%

Tags:
Backport:
Reviewed:
Affected Versions:
Component(RADOS):
Pull request ID:

Description

there are warnings existing in ceph codebase that needs update with respect to mordern c++

eg one of them:

In file included from /ceph/src/msg/async/ProtocolV2.cc:10:
/ceph/src/common/ceph_crypto.h: In constructor ‘ceph::crypto::ssl::HMAC::HMAC(const EVP_MD*, const unsigned char*, size_t)’:
/ceph/src/common/ceph_crypto.h:134:31: warning: ‘HMAC_CTX* HMAC_CTX_new()’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  134 |       : mpContext(HMAC_CTX_new()) {
      |                   ~~~~~~~~~~~~^~
In file included from /ceph/src/common/ceph_crypto.h:21,
                 from /ceph/src/msg/async/ProtocolV2.cc:10:
/usr/include/openssl/hmac.h:33:33: note: declared here
   33 | OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void);
      |                                 ^~~~~~~~~~~~
In file included from /ceph/src/msg/async/ProtocolV2.cc:10:
/ceph/src/common/ceph_crypto.h:135:34: warning: ‘int HMAC_Init_ex(HMAC_CTX*, const void*, int, const EVP_MD*, ENGINE*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  135 |       const auto r = HMAC_Init_ex(mpContext, key, length, type, nullptr);
      |                      ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /ceph/src/common/ceph_crypto.h:21,
                 from /ceph/src/msg/async/ProtocolV2.cc:10:
/usr/include/openssl/hmac.h:43:27: note: declared here
   43 | OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
      |                           ^~~~~~~~~~~~
In file included from /ceph/src/msg/async/ProtocolV2.cc:10:
/ceph/src/common/ceph_crypto.h: In destructor ‘ceph::crypto::ssl::HMAC::~HMAC()’:
/ceph/src/common/ceph_crypto.h:141:20: warning: ‘void HMAC_CTX_free(HMAC_CTX*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  141 |       HMAC_CTX_free(mpContext);
      |       ~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /ceph/src/common/ceph_crypto.h:21,
                 from /ceph/src/msg/async/ProtocolV2.cc:10:
/usr/include/openssl/hmac.h:35:28: note: declared here
   35 | OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx);
      |                            ^~~~~~~~~~~~~
In file included from /ceph/src/msg/async/ProtocolV2.cc:10:
/ceph/src/common/ceph_crypto.h: In member function ‘void ceph::crypto::ssl::HMAC::Restart()’:
/ceph/src/common/ceph_crypto.h:145:50: warning: ‘const EVP_MD* HMAC_CTX_get_md(const HMAC_CTX*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  145 |       const EVP_MD * const type = HMAC_CTX_get_md(mpContext);
      |                                   ~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /ceph/src/common/ceph_crypto.h:21,
                 from /ceph/src/msg/async/ProtocolV2.cc:10:
/usr/include/openssl/hmac.h:51:37: note: declared here
   51 | OSSL_DEPRECATEDIN_3_0 const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx);
      |                                     ^~~~~~~~~~~~~~~
In file included from /ceph/src/msg/async/ProtocolV2.cc:10:
/ceph/src/common/ceph_crypto.h:146:34: warning: ‘int HMAC_Init_ex(HMAC_CTX*, const void*, int, const EVP_MD*, ENGINE*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  146 |       const auto r = HMAC_Init_ex(mpContext, nullptr, 0, type, nullptr);
      |                      ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /ceph/src/common/ceph_crypto.h:21,
                 from /ceph/src/msg/async/ProtocolV2.cc:10:
/usr/include/openssl/hmac.h:43:27: note: declared here
   43 | OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
      |                           ^~~~~~~~~~~~
In file included from /ceph/src/msg/async/ProtocolV2.cc:10:
/ceph/src/common/ceph_crypto.h: In member function ‘void ceph::crypto::ssl::HMAC::Update(const unsigned char*, size_t)’:
/ceph/src/common/ceph_crypto.h:153:35: warning: ‘int HMAC_Update(HMAC_CTX*, const unsigned char*, size_t)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  153 |         const auto r = HMAC_Update(mpContext, input, length);
      |                        ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /ceph/src/common/ceph_crypto.h:21,
                 from /ceph/src/msg/async/ProtocolV2.cc:10:
/usr/include/openssl/hmac.h:45:27: note: declared here
   45 | OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
      |                           ^~~~~~~~~~~
In file included from /ceph/src/msg/async/ProtocolV2.cc:10:
/ceph/src/common/ceph_crypto.h: In member function ‘void ceph::crypto::ssl::HMAC::Final(unsigned char*)’:
/ceph/src/common/ceph_crypto.h:161:32: warning: ‘int HMAC_Final(HMAC_CTX*, unsigned char*, unsigned int*)’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
  161 |       const auto r = HMAC_Final(mpContext, digest, &s);
      |                      ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /ceph/src/common/ceph_crypto.h:21,
                 from /ceph/src/msg/async/ProtocolV2.cc:10:
/usr/include/openssl/hmac.h:47:27: note: declared here
   47 | OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md


Subtasks

Cleanup #52753: rbd cls : centos 8 warningRejectedIlya Dryomov

Cleanup #52754: windows warningsNew

rgw - Cleanup #52755: ubuntu 20.04 : rgw warningsNew

History

#1 Updated by Deepika Upadhyay over 2 years ago

  • Tags set to low-hanging-fruit, good-first-issue

#2 Updated by Laura Flores over 1 year ago

May be evident with "ninja common -j$(nproc)".

Also available in: Atom PDF