Skip to content

Commit

Permalink
added some changes in code to test cppcheck action
Browse files Browse the repository at this point in the history
  • Loading branch information
niwciu committed Nov 19, 2024
1 parent ba2c331 commit 9a468e8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modbus_slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ static void modbus_frame_error_callback(void);
*/
void register_app_data_to_modbus_slave_coils_table(modbus_adr_t coil_adr, modbus_coil_disin_t *app_data_ptr)
{
uint8_t a[3];
a[4]=5;

Check failure on line 69 in src/modbus_slave.c

View workflow job for this annotation

GitHub Actions / Results of CppCheck

Array 'a[3]' accessed at index 4, which is out of bounds.

Array 'a[3]' accessed at index 4, which is out of bounds.

Check warning on line 69 in src/modbus_slave.c

View workflow job for this annotation

GitHub Actions / Results of CppCheck

Variable 'a[4]' is assigned a value that is never used.

Variable 'a[4]' is assigned a value that is never used.
register_app_data_to_modbus_coils_din_table(Slave_Coils, coil_adr, app_data_ptr);
}

Expand Down

0 comments on commit 9a468e8

Please sign in to comment.