Skip to content

Commit

Permalink
Properly fix the warning
Browse files Browse the repository at this point in the history
  • Loading branch information
DominykasPetke committed Feb 21, 2024
1 parent cd59420 commit 03518b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lms7002m/LMS7002M.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@ OpStatus LMS7002M::Modify_SPI_Reg_bits(const uint16_t address, const uint8_t msb
*/
OpStatus LMS7002M::Modify_SPI_Reg_mask(const uint16_t* addr, const uint16_t* masks, const uint16_t* values, uint8_t start, uint8_t stop)
{
OpStatus status;
OpStatus status = OpStatus::SUCCESS;
uint16_t reg_data;
std::vector<uint16_t> addresses;
std::vector<uint16_t> data;
Expand All @@ -1758,9 +1758,9 @@ OpStatus LMS7002M::Modify_SPI_Reg_mask(const uint16_t* addr, const uint16_t* mas
data.push_back(reg_data);
++start;
}
status = SPI_write_batch(&addresses[0], &data[0], addresses.size());
if (status != OpStatus::SUCCESS)
return status;
status = SPI_write_batch(&addresses[0], &data[0], addresses.size());
return status;
}

Expand Down

0 comments on commit 03518b7

Please sign in to comment.