diff --git a/include/simple_timer/simple_timer.h b/include/simple_timer/simple_timer.h index 8194df8..0f34671 100644 --- a/include/simple_timer/simple_timer.h +++ b/include/simple_timer/simple_timer.h @@ -299,12 +299,12 @@ class SimpleTimer { catch (const std::exception &e) { state_ = State::Stopped; - std::fprintf(stderr, "\n\033[1;31m[SimpleTimer] Exception: %s\033[0m\n\n", e.what()); + static_cast(std::fprintf(stderr, "\n\033[1;31m[SimpleTimer] Exception: %s\033[0m\n\n", e.what())); } catch (...) { state_ = State::Stopped; - std::fprintf(stderr, "\n\033[1;31m[SimpleTimer] Unknown exception occurred.\033[0m\n\n"); + static_cast(std::fprintf(stderr, "\n\033[1;31m[SimpleTimer] Unknown exception occurred.\033[0m\n\n")); } lock.lock();