Skip to content

Commit

Permalink
Fixing quality error
Browse files Browse the repository at this point in the history
  • Loading branch information
LeStarch committed Oct 14, 2024
1 parent bb9bcd5 commit 72f2ace
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Drv/LinuxGpioDriver/LinuxGpioDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ Drv::GpioStatus LinuxGpioDriver ::gpioWrite_handler(const NATIVE_INT_TYPE portNu
void LinuxGpioDriver ::pollLoop() {
static_assert(GPIO_POLL_TIMEOUT < std::numeric_limits<int>::max(), "Poll timeout would overflow");
static_assert(sizeof(struct gpioevent_data) < std::numeric_limits<FwSizeType>::max(), "FwSizeType too small");
static_assert(std::numeric_limits<ssize_t>::max() <= std::numeric_limits<FwSizeType>::max());
// Setup poll information
pollfd file_descriptors[1];

Expand All @@ -291,7 +292,7 @@ void LinuxGpioDriver ::pollLoop() {
// Check for some file descriptor to be ready
if (status > 0) {
struct gpioevent_data event_data;
FwSizeType read_bytes = ::read(this->m_fd, &event_data, sizeof event_data);
FwSizeType read_bytes = static_cast<FwSizeType>(::read(this->m_fd, &event_data, sizeof event_data));
if (read_bytes == sizeof event_data) {
Os::RawTime timestamp;
timestamp.now();
Expand Down

0 comments on commit 72f2ace

Please sign in to comment.