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

bcall pushed a commit to branch quic-latest
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/quic-latest by this push:
     new 94f42e7  Updates to build on Fedora 26 and clang-format
94f42e7 is described below

commit 94f42e73042c77891bf1dabbd083d59978626c05
Author: Bryan Call <bc...@apache.org>
AuthorDate: Tue Aug 8 15:51:05 2017 -0700

    Updates to build on Fedora 26 and clang-format
---
 iocore/net/QUICNetProcessor.cc         | 2 +-
 iocore/net/QUICNetVConnection.cc       | 6 +++---
 iocore/net/QUICPacketHandler.cc        | 4 ++--
 iocore/net/quic/Mock.h                 | 4 +---
 iocore/net/quic/QUICFlowController.cc  | 2 +-
 iocore/net/quic/QUICFrame.cc           | 2 +-
 iocore/net/quic/QUICFrame.h            | 4 ++--
 iocore/net/quic/QUICFrameDispatcher.cc | 4 ++--
 iocore/net/quic/QUICHandshake.cc       | 2 +-
 iocore/net/quic/QUICStreamManager.cc   | 2 +-
 proxy/hq/HQSessionAccept.h             | 3 ++-
 11 files changed, 17 insertions(+), 18 deletions(-)

diff --git a/iocore/net/QUICNetProcessor.cc b/iocore/net/QUICNetProcessor.cc
index 72fb4e1..40eb37e 100644
--- a/iocore/net/QUICNetProcessor.cc
+++ b/iocore/net/QUICNetProcessor.cc
@@ -114,7 +114,7 @@ QUICNetProcessor::main_accept(Continuation *cont, SOCKET 
fd, AcceptOptions const
   // char thr_name[MAX_THREAD_NAME_LENGTH];
 
   NetAccept *na = createNetAccept(opt);
-  if (opt.accept_threads < 0) {
+  if (accept_threads < 0) {
     REC_ReadConfigInteger(accept_threads, "proxy.config.accept_threads");
   }
   NET_INCREMENT_DYN_STAT(net_accepts_currently_open_stat);
diff --git a/iocore/net/QUICNetVConnection.cc b/iocore/net/QUICNetVConnection.cc
index 926568f..1ff56e3 100644
--- a/iocore/net/QUICNetVConnection.cc
+++ b/iocore/net/QUICNetVConnection.cc
@@ -258,7 +258,7 @@ QUICNetVConnection::state_handshake(int event, Event *data)
 
   if (error.cls != QUICErrorClass::NONE) {
     // TODO: Send error if needed
-    Debug(tag, "QUICError: cls=%u, code=0x%x", error.cls, error.code);
+    Debug(tag, "QUICError: cls=%u, code=0x%x", static_cast<unsigned 
int>(error.cls), static_cast<unsigned int>(error.code));
   }
 
   if (this->_handshake_handler && this->_handshake_handler->is_completed()) {
@@ -295,7 +295,7 @@ QUICNetVConnection::state_connection_established(int event, 
Event *data)
 
   if (error.cls != QUICErrorClass::NONE) {
     // TODO: Send error if needed
-    Debug(tag, "QUICError: cls=%u, code=0x%x", error.cls, error.code);
+    Debug(tag, "QUICError: cls=%u, code=0x%x", static_cast<unsigned 
int>(error.cls), static_cast<unsigned int>(error.code));
   }
 
   return EVENT_CONT;
@@ -413,7 +413,7 @@ 
QUICNetVConnection::_state_connection_established_process_packet(std::unique_ptr
 
   if (this->_crypto->decrypt(plain_txt.get(), plain_txt_len, 
max_plain_txt_len, packet->payload(), packet->payload_size(),
                              packet->packet_number(), packet->header(), 
packet->header_size(), packet->key_phase())) {
-    Debug(tag, "Decrypt Packet, pkt_num: %llu, header_len: %hu, payload_len: 
%zu", packet->packet_number(), packet->header_size(),
+    Debug(tag, "Decrypt Packet, pkt_num: %lu, header_len: %hu, payload_len: 
%zu", packet->packet_number(), packet->header_size(),
           plain_txt_len);
 
     this->_recv_and_ack(plain_txt.get(), plain_txt_len, 
packet->packet_number());
diff --git a/iocore/net/QUICPacketHandler.cc b/iocore/net/QUICPacketHandler.cc
index 8847429..59ea5cc 100644
--- a/iocore/net/QUICPacketHandler.cc
+++ b/iocore/net/QUICPacketHandler.cc
@@ -67,7 +67,7 @@ QUICPacketHandler::acceptEvent(int event, void *data)
     UDPPacket *packet_r;
     ip_port_text_buffer ipb;
     while ((packet_r = queue->dequeue())) {
-      Debug("quic_sec", "received packet from %s, size=%lld", 
ats_ip_nptop(&packet_r->from.sa, ipb, sizeof(ipb)),
+      Debug("quic_sec", "received packet from %s, size=%ld", 
ats_ip_nptop(&packet_r->from.sa, ipb, sizeof(ipb)),
             packet_r->getPktLength());
       this->_recv_packet(event, packet_r);
     }
@@ -142,7 +142,7 @@ QUICPacketHandler::send_packet(const QUICPacket &packet, 
QUICNetVConnection *vc)
 
   // NOTE: p will be enqueued to udpOutQueue of UDPNetHandler
   ip_port_text_buffer ipb;
-  Debug("quic_sec", "send %s packet to %s, size=%lld", 
QUICDebugNames::packet_type(packet.type()),
+  Debug("quic_sec", "send %s packet to %s, size=%ld", 
QUICDebugNames::packet_type(packet.type()),
         ats_ip_nptop(&udpPkt->to.sa, ipb, sizeof(ipb)), 
udpPkt->getPktLength());
   vc->get_udp_con()->send(this, udpPkt);
 }
diff --git a/iocore/net/quic/Mock.h b/iocore/net/quic/Mock.h
index 094bce3..9483ce3 100644
--- a/iocore/net/quic/Mock.h
+++ b/iocore/net/quic/Mock.h
@@ -9,9 +9,7 @@
 class MockQUICPacketTransmitter : public QUICPacketTransmitter
 {
 public:
-  MockQUICPacketTransmitter() : QUICPacketTransmitter() {
-    this->_mutex= new_ProxyMutex();
-  };
+  MockQUICPacketTransmitter() : QUICPacketTransmitter() { this->_mutex = 
new_ProxyMutex(); };
 
   void
   transmit_packet(std::unique_ptr<const QUICPacket> packet) override
diff --git a/iocore/net/quic/QUICFlowController.cc 
b/iocore/net/quic/QUICFlowController.cc
index b746aa2..273715a 100644
--- a/iocore/net/quic/QUICFlowController.cc
+++ b/iocore/net/quic/QUICFlowController.cc
@@ -35,7 +35,7 @@ QUICFlowController::handle_frame(std::shared_ptr<const 
QUICFrame> frame)
   case QUICFrameType::STREAM:
     break;
   default:
-    Debug(tag, "Unexpected frame type: %02x", frame->type());
+    Debug(tag, "Unexpected frame type: %02x", static_cast<unsigned 
int>(frame->type()));
     ink_assert(false);
     break;
   }
diff --git a/iocore/net/quic/QUICFrame.cc b/iocore/net/quic/QUICFrame.cc
index 8ca581d..d7495c7 100644
--- a/iocore/net/quic/QUICFrame.cc
+++ b/iocore/net/quic/QUICFrame.cc
@@ -612,7 +612,7 @@ 
QUICAckFrame::AckBlockSection::const_iterator::const_iterator(uint8_t index, con
   this->_ack_blocks = ack_block;
   if (this->_ack_blocks->size()) {
     if (this->_ack_blocks->size() == this->_index) {
-      this->_current_block = {0, 0ULL};
+      this->_current_block = {static_cast<uint8_t>(0), 0ULL};
     } else {
       this->_current_block = this->_ack_blocks->at(this->_index);
     }
diff --git a/iocore/net/quic/QUICFrame.h b/iocore/net/quic/QUICFrame.h
index a424780..2e87d4f 100644
--- a/iocore/net/quic/QUICFrame.h
+++ b/iocore/net/quic/QUICFrame.h
@@ -125,7 +125,7 @@ public:
           // TODO Parse Ack Block
         } else {
           if (this->_ack_blocks->size() == this->_index) {
-            this->_current_block = {0, 0ULL};
+            this->_current_block = {static_cast<uint8_t>(0), 0ULL};
           } else {
             this->_current_block = this->_ack_blocks->at(this->_index);
           }
@@ -150,7 +150,7 @@ public:
       uint8_t _index;
       const uint8_t *_buf;
       const std::vector<QUICAckFrame::AckBlock> *_ack_blocks = nullptr;
-      QUICAckFrame::AckBlock _current_block                  = {0, 0ULL};
+      QUICAckFrame::AckBlock _current_block                  = 
{static_cast<uint8_t>(0), 0ULL};
     };
 
     AckBlockSection(uint64_t first_ack_block_length);
diff --git a/iocore/net/quic/QUICFrameDispatcher.cc 
b/iocore/net/quic/QUICFrameDispatcher.cc
index 2a79560..faf664a 100644
--- a/iocore/net/quic/QUICFrameDispatcher.cc
+++ b/iocore/net/quic/QUICFrameDispatcher.cc
@@ -64,7 +64,7 @@ QUICFrameDispatcher::receive_frames(const uint8_t *payload, 
uint16_t size)
 
     // TODO: check debug build
     if (frame->type() != QUICFrameType::PADDING) {
-      Debug(tag, "frame type %d, size %zu", frame->type(), frame->size());
+      Debug(tag, "frame type %d, size %zu", static_cast<int>(frame->type()), 
frame->size());
     }
 
     // FIXME We should probably use a mapping table. All the objects has the 
common interface (QUICFrameHandler).
@@ -138,7 +138,7 @@ QUICFrameDispatcher::receive_frames(const uint8_t *payload, 
uint16_t size)
     }
     default:
       // Unknown frame
-      Debug(tag, "Unknown frame type: %02x", frame->type());
+      Debug(tag, "Unknown frame type: %02x", static_cast<unsigned 
int>(frame->type()));
       ink_assert(false);
 
       break;
diff --git a/iocore/net/quic/QUICHandshake.cc b/iocore/net/quic/QUICHandshake.cc
index e4221ae..b1761b6 100644
--- a/iocore/net/quic/QUICHandshake.cc
+++ b/iocore/net/quic/QUICHandshake.cc
@@ -30,7 +30,7 @@
 #define I_WANNA_DUMP_THIS_BUF(buf, len)                                        
                                                   \
   {                                                                            
                                                   \
     int i, j;                                                                  
                                                   \
-    fprintf(stderr, "len=%lld\n", len);                                        
                                                   \
+    fprintf(stderr, "len=%ld\n", len);                                         
                                                   \
     for (i = 0; i < len / 8; i++) {                                            
                                                   \
       fprintf(stderr, "%02x %02x %02x %02x %02x %02x %02x %02x ", buf[i * 8 + 
0], buf[i * 8 + 1], buf[i * 8 + 2], buf[i * 8 + 3], \
               buf[i * 8 + 4], buf[i * 8 + 5], buf[i * 8 + 6], buf[i * 8 + 7]); 
                                                   \
diff --git a/iocore/net/quic/QUICStreamManager.cc 
b/iocore/net/quic/QUICStreamManager.cc
index c5bb46e..6499772 100644
--- a/iocore/net/quic/QUICStreamManager.cc
+++ b/iocore/net/quic/QUICStreamManager.cc
@@ -52,7 +52,7 @@ QUICStreamManager::handle_frame(std::shared_ptr<const 
QUICFrame> frame)
     this->_handle_stream_frame(std::dynamic_pointer_cast<const 
QUICStreamFrame>(frame));
     break;
   default:
-    Debug(tag, "Unexpected frame type: %02x", frame->type());
+    Debug(tag, "Unexpected frame type: %02x", static_cast<unsigned 
int>(frame->type()));
     ink_assert(false);
     break;
   }
diff --git a/proxy/hq/HQSessionAccept.h b/proxy/hq/HQSessionAccept.h
index 68fb584..16abc41 100644
--- a/proxy/hq/HQSessionAccept.h
+++ b/proxy/hq/HQSessionAccept.h
@@ -38,7 +38,8 @@
 //
 // CONFIG proxy.config.http.server_ports STRING 443:quic
 
-class HQSessionAccept : public SessionAccept {
+class HQSessionAccept : public SessionAccept
+{
 public:
   explicit HQSessionAccept(const HttpSessionAccept::Options &);
   ~HQSessionAccept();

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <commits@trafficserver.apache.org>'].

Reply via email to