From 522ae005d1c62915a4de4b97d84a47f85d39f70e Mon Sep 17 00:00:00 2001 From: Akshay Raj Gollahalli Date: Mon, 4 Aug 2025 09:06:22 +1200 Subject: [PATCH] Fix arithmetic warnings --- .gitignore | 1 + src/impl/unix.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9fd6d2b..0079382 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ doc/html ipch Debug Release +.idea/ # pixi environments .pixi diff --git a/src/impl/unix.cc b/src/impl/unix.cc index fc3936d..0f415f5 100755 --- a/src/impl/unix.cc +++ b/src/impl/unix.cc @@ -455,7 +455,7 @@ Serial::SerialImpl::reconfigurePort () // Compensate for the stopbits_one_point_five enum being equal to int 3, // and not 1.5. if (stopbits_ == stopbits_one_point_five) { - byte_time_ns_ += ((1.5 - stopbits_one_point_five) * bit_time_ns); + byte_time_ns_ += (1.5 - static_cast(stopbits_one_point_five)) * bit_time_ns; } }