You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by al...@apache.org on 2022/02/18 00:42:48 UTC

[kudu] 01/03: [security] harmonize tls_handshake.cc

This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit d2b1d2f40f6fc4aacf73b2cc865a9e5c35e00c10
Author: Andrew Wong <aw...@cloudera.com>
AuthorDate: Wed Feb 16 18:37:54 2022 -0800

    [security] harmonize tls_handshake.cc
    
    The first parameter of Socket.Write() is of type `const uint8_t *`. This
    resulted in a warning in TlsHandshake::Finish(). This caused an Impala
    build failure since the warning was treated as an error.
    
    This is a follow-up to df6590d26d.
    
    Change-Id: Iddf1bd7ee39ea74eff74871c83c5159e53fc7377
    Reviewed-on: http://gerrit.cloudera.org:8080/18246
    Tested-by: Alexey Serbin <as...@cloudera.com>
    Reviewed-by: Alexey Serbin <as...@cloudera.com>
---
 src/kudu/security/tls_handshake.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/kudu/security/tls_handshake.cc b/src/kudu/security/tls_handshake.cc
index c313308..82e22e0 100644
--- a/src/kudu/security/tls_handshake.cc
+++ b/src/kudu/security/tls_handshake.cc
@@ -313,7 +313,7 @@ Status TlsHandshake::Finish(unique_ptr<Socket>* socket) {
   if (data_size != 0) {
     int fd = SSL_get_fd(ssl);
     Socket sock(fd);
-    uint8_t* data = reinterpret_cast<uint8_t*>(rbio_pending_data_.data());
+    const uint8_t* data = reinterpret_cast<const uint8_t*>(rbio_pending_data_.data());
     int32_t written = 0;
     RETURN_NOT_OK(sock.Write(data, data_size, &written));
     if (written != data_size) {