Commit 00de64bb authored by David Renshaw's avatar David Renshaw

fix more errors reported by 'clang++ -Werror'

parent bc93d04e
...@@ -51,7 +51,7 @@ private: ...@@ -51,7 +51,7 @@ private:
bool initialized = false; bool initialized = false;
}; };
class Compiler::Node: public NodeTranslator::Resolver { class Compiler::Node final: public NodeTranslator::Resolver {
// Passes through four states: // Passes through four states:
// - Stub: On initial construction, the Node is just a placeholder object. Its ID has been // - Stub: On initial construction, the Node is just a placeholder object. Its ID has been
// determined, and it is placed in its parent's member table as well as the compiler's // determined, and it is placed in its parent's member table as well as the compiler's
......
...@@ -52,7 +52,7 @@ public: ...@@ -52,7 +52,7 @@ public:
// Read and return the content of a file specified using `embed`. // Read and return the content of a file specified using `embed`.
}; };
class Compiler: private SchemaLoader::LazyLoadCallback { class Compiler final: private SchemaLoader::LazyLoadCallback {
// Cross-links separate modules (schema files) and translates them into schema nodes. // Cross-links separate modules (schema files) and translates them into schema nodes.
// //
// This class is thread-safe, hence all its methods are const. // This class is thread-safe, hence all its methods are const.
......
...@@ -270,7 +270,7 @@ public: ...@@ -270,7 +270,7 @@ public:
} }
}; };
struct Group: public StructOrGroup { struct Group final: public StructOrGroup {
public: public:
class DataLocationUsage { class DataLocationUsage {
public: public:
......
...@@ -32,7 +32,7 @@ namespace { ...@@ -32,7 +32,7 @@ namespace {
using Thing = test::TestMembrane::Thing; using Thing = test::TestMembrane::Thing;
class ThingImpl: public Thing::Server { class ThingImpl final: public Thing::Server {
public: public:
ThingImpl(kj::StringPtr text): text(text) {} ThingImpl(kj::StringPtr text): text(text) {}
...@@ -51,7 +51,7 @@ private: ...@@ -51,7 +51,7 @@ private:
kj::StringPtr text; kj::StringPtr text;
}; };
class TestMembraneImpl: public test::TestMembrane::Server { class TestMembraneImpl final: public test::TestMembrane::Server {
protected: protected:
kj::Promise<void> makeThing(MakeThingContext context) override { kj::Promise<void> makeThing(MakeThingContext context) override {
context.getResults().setThing(kj::heap<ThingImpl>("inside")); context.getResults().setThing(kj::heap<ThingImpl>("inside"));
......
...@@ -339,18 +339,18 @@ public: ...@@ -339,18 +339,18 @@ public:
// authenticate this, so that the caller can be assured that they are really talking to the // authenticate this, so that the caller can be assured that they are really talking to the
// identified vat and not an imposter. // identified vat and not an imposter.
virtual kj::Own<OutgoingRpcMessage> newOutgoingMessage(uint firstSegmentWordSize) = 0; virtual kj::Own<OutgoingRpcMessage> newOutgoingMessage(uint firstSegmentWordSize) override = 0;
// Allocate a new message to be sent on this connection. // Allocate a new message to be sent on this connection.
// //
// If `firstSegmentWordSize` is non-zero, it should be treated as a hint suggesting how large // If `firstSegmentWordSize` is non-zero, it should be treated as a hint suggesting how large
// to make the first segment. This is entirely a hint and the connection may adjust it up or // to make the first segment. This is entirely a hint and the connection may adjust it up or
// down. If it is zero, the connection should choose the size itself. // down. If it is zero, the connection should choose the size itself.
virtual kj::Promise<kj::Maybe<kj::Own<IncomingRpcMessage>>> receiveIncomingMessage() = 0; virtual kj::Promise<kj::Maybe<kj::Own<IncomingRpcMessage>>> receiveIncomingMessage() override = 0;
// Wait for a message to be received and return it. If the read stream cleanly terminates, // Wait for a message to be received and return it. If the read stream cleanly terminates,
// return null. If any other problem occurs, throw an exception. // return null. If any other problem occurs, throw an exception.
virtual kj::Promise<void> shutdown() KJ_WARN_UNUSED_RESULT = 0; virtual kj::Promise<void> shutdown() override KJ_WARN_UNUSED_RESULT = 0;
// Waits until all outgoing messages have been sent, then shuts down the outgoing stream. The // Waits until all outgoing messages have been sent, then shuts down the outgoing stream. The
// returned promise resolves after shutdown is complete. // returned promise resolves after shutdown is complete.
......
...@@ -585,7 +585,7 @@ private: ...@@ -585,7 +585,7 @@ private:
uint countLeft; uint countLeft;
OnReadyEvent onReadyEvent; OnReadyEvent onReadyEvent;
class Branch: public Event { class Branch final: public Event {
public: public:
Branch(ArrayJoinPromiseNodeBase& joinNode, Own<PromiseNode> dependency, Branch(ArrayJoinPromiseNodeBase& joinNode, Own<PromiseNode> dependency,
ExceptionOrValue& output); ExceptionOrValue& output);
......
...@@ -34,12 +34,12 @@ typedef Quantity<int, Bytes> ByteCount; ...@@ -34,12 +34,12 @@ typedef Quantity<int, Bytes> ByteCount;
typedef Quantity<int, KiB> KiBCount; typedef Quantity<int, KiB> KiBCount;
typedef Quantity<int, MiB> MiBCount; typedef Quantity<int, MiB> MiBCount;
constexpr ByteCount BYTE = unit<ByteCount>(); constexpr ByteCount BYTE KJ_UNUSED = unit<ByteCount>();
constexpr KiBCount KIB = unit<KiBCount>(); constexpr KiBCount KIB = unit<KiBCount>();
constexpr MiBCount MIB = unit<MiBCount>(); constexpr MiBCount MIB = unit<MiBCount>();
constexpr UnitRatio<int, Bytes, KiB> BYTES_PER_KIB = 1024 * BYTE / KIB; constexpr UnitRatio<int, Bytes, KiB> BYTES_PER_KIB KJ_UNUSED = 1024 * BYTE / KIB;
constexpr UnitRatio<int, Bytes, MiB> BYTES_PER_MIB = 1024 * 1024 * BYTE / MIB; constexpr UnitRatio<int, Bytes, MiB> BYTES_PER_MIB KJ_UNUSED = 1024 * 1024 * BYTE / MIB;
constexpr auto KIB_PER_MIB = 1024 * KIB / MIB; constexpr auto KIB_PER_MIB = 1024 * KIB / MIB;
template <typename T, typename U> template <typename T, typename U>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment