Skip to content

Commit

Permalink
Merge pull request #2486 from digit-google/remove-warnings
Browse files Browse the repository at this point in the history
Remove warnings
  • Loading branch information
jhasse authored Aug 30, 2024
2 parents f220dc5 + 50ae55a commit 4b7d399
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 33 deletions.
19 changes: 8 additions & 11 deletions src/build.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,10 @@ namespace {

/// A CommandRunner that doesn't actually run the commands.
struct DryRunCommandRunner : public CommandRunner {
virtual ~DryRunCommandRunner() {}

// Overridden from CommandRunner:
virtual size_t CanRunMore() const;
virtual bool StartCommand(Edge* edge);
virtual bool WaitForCommand(Result* result);
size_t CanRunMore() const override;
bool StartCommand(Edge* edge) override;
bool WaitForCommand(Result* result) override;

private:
queue<Edge*> finished_;
Expand Down Expand Up @@ -595,12 +593,11 @@ void Plan::Dump() const {

struct RealCommandRunner : public CommandRunner {
explicit RealCommandRunner(const BuildConfig& config) : config_(config) {}
virtual ~RealCommandRunner() {}
virtual size_t CanRunMore() const;
virtual bool StartCommand(Edge* edge);
virtual bool WaitForCommand(Result* result);
virtual vector<Edge*> GetActiveEdges();
virtual void Abort();
size_t CanRunMore() const override;
bool StartCommand(Edge* edge) override;
bool WaitForCommand(Result* result) override;
vector<Edge*> GetActiveEdges() override;
void Abort() override;

const BuildConfig& config_;
SubprocessSet subprocs_;
Expand Down
1 change: 0 additions & 1 deletion src/explanations.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ struct Explanations {
}

private:
bool enabled_ = false;
std::unordered_map<const void*, std::vector<std::string>> map_;
};

Expand Down
9 changes: 0 additions & 9 deletions src/metrics.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ int64_t HighResTimer() {
.count();
}

constexpr int64_t GetFrequency() {
// If numerator isn't 1 then we lose precision and that will need to be
// assessed.
static_assert(std::chrono::steady_clock::period::num == 1,
"Numerator must be 1");
return std::chrono::steady_clock::period::den /
std::chrono::steady_clock::period::num;
}

int64_t TimerToMicros(int64_t dt) {
// dt is in ticks. We want microseconds.
return chrono::duration_cast<chrono::microseconds>(
Expand Down
22 changes: 10 additions & 12 deletions src/status_printer.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,19 @@ struct StatusPrinter : Status {
explicit StatusPrinter(const BuildConfig& config);

/// Callbacks for the Plan to notify us about adding/removing Edge's.
virtual void EdgeAddedToPlan(const Edge* edge);
virtual void EdgeRemovedFromPlan(const Edge* edge);
void EdgeAddedToPlan(const Edge* edge) override;
void EdgeRemovedFromPlan(const Edge* edge) override;

virtual void BuildEdgeStarted(const Edge* edge, int64_t start_time_millis);
virtual void BuildEdgeFinished(Edge* edge, int64_t start_time_millis,
void BuildEdgeStarted(const Edge* edge, int64_t start_time_millis) override;
void BuildEdgeFinished(Edge* edge, int64_t start_time_millis,
int64_t end_time_millis, bool success,
const std::string& output);
virtual void BuildStarted();
virtual void BuildFinished();
const std::string& output) override;
void BuildStarted() override;
void BuildFinished() override;

virtual void Info(const char* msg, ...);
virtual void Warning(const char* msg, ...);
virtual void Error(const char* msg, ...);

virtual ~StatusPrinter() {}
void Info(const char* msg, ...) override;
void Warning(const char* msg, ...) override;
void Error(const char* msg, ...) override;

/// Format the progress status string by replacing the placeholders.
/// See the user manual for more information about the available
Expand Down

0 comments on commit 4b7d399

Please sign in to comment.