Skip to content

Commit

Permalink
core/thread_cputime_clock: add [[maybe_unused]] attribute
Browse files Browse the repository at this point in the history
to silence warning like

warning: unused variable ‘ret’ [-Wunused-variable]

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed May 7, 2019
1 parent 4bac5a8 commit 0f1c501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/seastar/core/thread_cputime_clock.hh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public:
using namespace std::chrono_literals;

struct timespec tp;
auto ret = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp);
[[maybe_unused]] auto ret = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp);
assert(ret == 0);
return time_point(tp.tv_nsec * 1ns + tp.tv_sec * 1s);
}
Expand Down

0 comments on commit 0f1c501

Please sign in to comment.