Skip to content

Commit

Permalink
Fix warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
herve-er committed Dec 12, 2024
1 parent 3792ea6 commit f1ded6f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/libcommon/log/sentry/abstractcounterscopedptrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AbstractCounterScopedPTrace : public AbstractScopedPTrace {
AbstractScopedPTrace(info, PTraceStatus::Cancelled, syncDbId), _nbOfCyclesPerTrace(nbOfCyclePerTrace) {}

private:
void stop(PTraceStatus status = PTraceStatus::Ok) final {
void stop([[maybe_unused]] PTraceStatus status = PTraceStatus::Ok) final {
assert(false && "stop() should not be called with CounterScopedPTrace.");
}
void restart() final {
Expand Down
13 changes: 8 additions & 5 deletions src/libcommon/log/sentry/ptraces.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,14 @@
namespace KDC::sentry::pTraces {

struct None : public AbstractPTrace {
None() = default;
None(int syncdbId) : AbstractPTrace({}, syncdbId) {}
void start() final {}
void stop(PTraceStatus status = PTraceStatus::Ok) final {}
void restart() final {}
None() : AbstractPTrace({}){};
explicit None(int syncdbId) : AbstractPTrace({}, syncdbId) {}
void start() final { /* Do nothing */
}
void stop([[maybe_unused]] PTraceStatus status = PTraceStatus::Ok) final { /* Do nothing */
}
void restart() final { /* Do nothing */
}
};

/*
Expand Down

0 comments on commit f1ded6f

Please sign in to comment.