to silence warning from GCC when performing release build, like:
../src/tools/osdmaptool.cc: In function ‘int main(int, const char**)’:
../src/tools/osdmaptool.cc:472:9: warning: variable ‘r’ set but not used [-Wunused-but-set-variable]
472 | int r = clock_gettime(CLOCK_MONOTONIC, &round_start);
| ^
Signed-off-by: Kefu Chai <kchai@redhat.com>
}
int rounds = 0;
struct timespec round_start;
- int r = clock_gettime(CLOCK_MONOTONIC, &round_start);
+ [[maybe_unused]] int r = clock_gettime(CLOCK_MONOTONIC, &round_start);
assert(r == 0);
do {
random_device_t rd;