Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions iocore/eventsystem/I_Continuation.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ constexpr ContinuationHandler
continuation_handler_void_ptr(int (C::*fp)(int, T *))
{
auto fp2 = reinterpret_cast<int (C::*)(int, void *)>(fp);

// We keep this a static_cast for added static type analysis from the
// compiler. If a compiler warning is generated for the following line of
// code of the type "-Werror=shift-negative-value", then this may be an issue
// with multiple inheritance of the C templated type. Make sure that for type
// C the Continuation parent is listed first (either directly or indirectly
// via the inheritance tree) before any other parent in the multiple class
// heirarchy of C.
return static_cast<ContinuationHandler>(fp2);
}

Expand Down
2 changes: 1 addition & 1 deletion iocore/net/quic/QUICStreamVCAdapter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "I_VConnection.h"
#include "QUICStreamVCAdapter.h"

QUICStreamVCAdapter::QUICStreamVCAdapter(QUICStream &stream) : QUICStreamAdapter(stream), VConnection(new_ProxyMutex())
QUICStreamVCAdapter::QUICStreamVCAdapter(QUICStream &stream) : VConnection(new_ProxyMutex()), QUICStreamAdapter(stream)
{
SET_HANDLER(&QUICStreamVCAdapter::state_stream_open);
}
Expand Down
2 changes: 1 addition & 1 deletion iocore/net/quic/QUICStreamVCAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "QUICStreamAdapter.h"
#include "I_IOBuffer.h"

class QUICStreamVCAdapter : public QUICStreamAdapter, public VConnection
class QUICStreamVCAdapter : public VConnection, public QUICStreamAdapter
{
public:
class IOInfo;
Expand Down
2 changes: 1 addition & 1 deletion lib/fastlz/fastlz.cc
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ flz_copy64(uint8_t *dest, const uint8_t *src, uint32_t count)
{
const uint8_t *p = (const uint8_t *)src;
uint8_t *q = (uint8_t *)dest;
int c;
unsigned int c;
for (c = 0; c < count * 8; ++c) {
*q++ = *p++;
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/experimental/traffic_dump/json_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ esc_json_out(const char *buf, int64_t len, std::ostream &jsonfile)
break;
}
default: {
if ('\x00' <= c && c <= '\x1f') {
if (c <= '\x1f') {
write_buffered_context(buf, prevIdx, idx, jsonfile);
jsonfile << "\\u" << std::hex << std::setw(4) << std::setfill('0') << static_cast<int>(c);
}
Expand Down
6 changes: 3 additions & 3 deletions plugins/header_rewrite/conditions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1125,9 +1125,9 @@ ConditionInbound::append_value(std::string &s, const Resources &res, NetworkSess
zret = TSHttpTxnClientProtocolStackContains(res.txnp, "ip");
break;
case NET_QUAL_STACK: {
std::array<char const *, 8> tags;
int count = 0;
size_t len = 0;
std::array<char const *, 8> tags = {};
int count = 0;
size_t len = 0;
TSHttpTxnClientProtocolStackGet(res.txnp, tags.size(), tags.data(), &count);
for (int i = 0; i < count; ++i) {
len += 1 + strlen(tags[i]);
Expand Down
2 changes: 1 addition & 1 deletion proxy/http3/Http3HeaderVIOAdaptor.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

#include "Http3FrameHandler.h"

class Http3HeaderVIOAdaptor : public Http3FrameHandler, public Continuation
class Http3HeaderVIOAdaptor : public Continuation, public Http3FrameHandler
{
public:
Http3HeaderVIOAdaptor(VIO *sink, HTTPType http_type, QPACK *qpack, uint64_t stream_id);
Expand Down