mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-11-09 10:00:57 +03:00
Add -Wextra-semi compiler flag
Summary: Cleaned up extra semicolons for compatibility with other projects enforcing the flag, included flag in build Reviewed By: lnicco, JunqiWang Differential Revision: D21794945 fbshipit-source-id: ae2ee637aadeef35a99d89f9b8deaa2e7d636ed7
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f46dff82e2
commit
8e785bbfc2
@@ -16,49 +16,49 @@ namespace quic {
|
||||
QuicTransportException::QuicTransportException(
|
||||
const std::string& msg,
|
||||
TransportErrorCode errCode)
|
||||
: std::runtime_error(msg), errCode_(errCode){};
|
||||
: std::runtime_error(msg), errCode_(errCode) {}
|
||||
|
||||
QuicTransportException::QuicTransportException(
|
||||
const char* msg,
|
||||
TransportErrorCode errCode)
|
||||
: std::runtime_error(msg), errCode_(errCode){};
|
||||
: std::runtime_error(msg), errCode_(errCode) {}
|
||||
|
||||
QuicTransportException::QuicTransportException(
|
||||
const std::string& msg,
|
||||
TransportErrorCode errCode,
|
||||
FrameType frameType)
|
||||
: std::runtime_error(msg), errCode_(errCode), frameType_(frameType){};
|
||||
: std::runtime_error(msg), errCode_(errCode), frameType_(frameType) {}
|
||||
|
||||
QuicTransportException::QuicTransportException(
|
||||
const char* msg,
|
||||
TransportErrorCode errCode,
|
||||
FrameType frameType)
|
||||
: std::runtime_error(msg), errCode_(errCode), frameType_(frameType){};
|
||||
: std::runtime_error(msg), errCode_(errCode), frameType_(frameType) {}
|
||||
|
||||
QuicInternalException::QuicInternalException(
|
||||
const std::string& msg,
|
||||
LocalErrorCode errCode)
|
||||
: std::runtime_error(msg), errorCode_(errCode){};
|
||||
: std::runtime_error(msg), errorCode_(errCode) {}
|
||||
|
||||
QuicInternalException::QuicInternalException(
|
||||
const char* msg,
|
||||
LocalErrorCode errCode)
|
||||
: std::runtime_error(msg), errorCode_(errCode){};
|
||||
: std::runtime_error(msg), errorCode_(errCode) {}
|
||||
|
||||
QuicInternalException::QuicInternalException(
|
||||
folly::StringPiece msg,
|
||||
LocalErrorCode errCode)
|
||||
: std::runtime_error(folly::to<std::string>(msg)), errorCode_(errCode){};
|
||||
: std::runtime_error(folly::to<std::string>(msg)), errorCode_(errCode) {}
|
||||
|
||||
QuicApplicationException::QuicApplicationException(
|
||||
const std::string& msg,
|
||||
ApplicationErrorCode errorCode)
|
||||
: std::runtime_error(msg), errorCode_(errorCode){};
|
||||
: std::runtime_error(msg), errorCode_(errorCode) {}
|
||||
|
||||
QuicApplicationException::QuicApplicationException(
|
||||
const char* msg,
|
||||
ApplicationErrorCode errorCode)
|
||||
: std::runtime_error(msg), errorCode_(errorCode){};
|
||||
: std::runtime_error(msg), errorCode_(errorCode) {}
|
||||
|
||||
folly::StringPiece toString(LocalErrorCode code) {
|
||||
switch (code) {
|
||||
|
||||
@@ -167,7 +167,7 @@ class MockQuicTransport : public QuicServerTransport {
|
||||
|
||||
virtual ~MockQuicTransport() {
|
||||
customDestructor();
|
||||
};
|
||||
}
|
||||
|
||||
MOCK_METHOD0(customDestructor, void());
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ folly::Expected<size_t, TransportErrorCode> encodeQuicInteger(
|
||||
return encodeEightBytes(std::move(bufop), value);
|
||||
}
|
||||
return folly::makeUnexpected(TransportErrorCode::INTERNAL_ERROR);
|
||||
};
|
||||
}
|
||||
|
||||
template <typename BufOp>
|
||||
folly::Expected<size_t, TransportErrorCode>
|
||||
@@ -92,7 +92,7 @@ encodeQuicInteger(uint64_t value, BufOp bufop, int outputSize) {
|
||||
return encodeEightBytes(std::move(bufop), value);
|
||||
}
|
||||
return folly::makeUnexpected(TransportErrorCode::INTERNAL_ERROR);
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads an integer out of the cursor and returns a pair with the integer and
|
||||
@@ -141,7 +141,7 @@ class QuicInteger {
|
||||
folly::to<std::string>("Value too large ", value_), size.error());
|
||||
}
|
||||
return size.value();
|
||||
};
|
||||
}
|
||||
|
||||
template <typename BufOp>
|
||||
size_t encode(BufOp appender, int outputSize) const {
|
||||
@@ -152,7 +152,7 @@ class QuicInteger {
|
||||
folly::to<std::string>("Value too large ", value_), size.error());
|
||||
}
|
||||
return size.value();
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the number of bytes needed to represent the QUIC integer in
|
||||
|
||||
@@ -388,7 +388,7 @@ class PacketBuilderWrapper : public PacketBuilderInterface {
|
||||
|
||||
FOLLY_NODISCARD bool canBuildPacket() const noexcept override {
|
||||
return builder.canBuildPacket();
|
||||
};
|
||||
}
|
||||
|
||||
FOLLY_NODISCARD uint32_t getHeaderBytes() const override {
|
||||
return builder.getHeaderBytes();
|
||||
|
||||
@@ -14,31 +14,31 @@ namespace quic {
|
||||
|
||||
std::string getFlowControlEvent(int offset) {
|
||||
return "flow control event, new offset: " + folly::to<std::string>(offset);
|
||||
};
|
||||
}
|
||||
|
||||
std::string
|
||||
getRxStreamWU(StreamId streamId, PacketNum packetNum, uint64_t maximumData) {
|
||||
return "rx stream, streamId: " + folly::to<std::string>(streamId) +
|
||||
", packetNum: " + folly::to<std::string>(packetNum) +
|
||||
", maximumData: " + folly::to<std::string>(maximumData);
|
||||
};
|
||||
}
|
||||
|
||||
std::string getRxConnWU(PacketNum packetNum, uint64_t maximumData) {
|
||||
return "rx, packetNum: " + folly::to<std::string>(packetNum) +
|
||||
", maximumData: " + folly::to<std::string>(maximumData);
|
||||
};
|
||||
}
|
||||
|
||||
std::string getPeerClose(const std::string& peerCloseReason) {
|
||||
return "error message: " + peerCloseReason;
|
||||
};
|
||||
}
|
||||
|
||||
std::string getFlowControlWindowAvailable(uint64_t windowAvailable) {
|
||||
return "on flow control, window available: " +
|
||||
folly::to<std::string>(windowAvailable);
|
||||
};
|
||||
}
|
||||
|
||||
std::string getClosingStream(const std::string& streamId) {
|
||||
return "closing stream, stream id: " + streamId;
|
||||
};
|
||||
}
|
||||
|
||||
} // namespace quic
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace quic::test {
|
||||
class MockQLogger : public QLogger {
|
||||
public:
|
||||
MockQLogger() = delete;
|
||||
MockQLogger(VantagePoint vp) : QLogger(vp, kHTTP3ProtocolType){};
|
||||
MockQLogger(VantagePoint vp) : QLogger(vp, kHTTP3ProtocolType) {}
|
||||
~MockQLogger() override = default;
|
||||
MOCK_METHOD2(addPacket, void(const RegularQuicPacket&, uint64_t));
|
||||
MOCK_METHOD3(
|
||||
|
||||
@@ -565,7 +565,7 @@ void QuicServer::setEventBaseObserver(
|
||||
runOnAllWorkers([observer](auto worker) {
|
||||
worker->getEventBase()->setObserver(observer);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
void QuicServer::startPacketForwarding(const folly::SocketAddress& destAddr) {
|
||||
if (initialized_) {
|
||||
|
||||
Reference in New Issue
Block a user