Private
Public Access
2
0
Files
mraa/src
Alex T ee6e65a5bf mock: use MRAA_PIN_NAME_SIZE for strncpy to avoid truncation
This fixes the following compilation warnings:

mraa/src/src/mock/mock_board.c: In function ‘mraa_mock_board’:
mraa/src/src/mock/mock_board.c:156:5: warning: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
  156 |     strncpy(b->pins[pos].name, "SPI0MOSI", 8);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mraa/src/src/mock/mock_board.c:162:5: warning: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
  162 |     strncpy(b->pins[pos].name, "SPI0MISO", 8);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mraa/src/src/mock/mock_board.c:168:5: warning: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
  168 |     strncpy(b->pins[pos].name, "SPI0SCLK", 8);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Alex T <alext.mkrs@gmail.com>
2025-10-13 09:00:18 -07:00
..
2022-08-05 12:04:23 -07:00
2024-08-28 07:57:39 -07:00
2019-05-23 10:09:12 -07:00
2019-05-23 10:09:12 -07:00
2024-01-23 08:46:37 -08:00
2019-05-23 10:09:12 -07:00
2022-08-05 12:04:23 -07:00
2019-05-23 10:09:12 -07:00
2020-09-15 10:39:42 -07:00
2019-05-23 10:09:12 -07:00
2021-06-29 11:49:25 -07:00
2019-05-23 10:09:12 -07:00
2022-08-05 12:04:23 -07:00
2022-08-05 12:04:23 -07:00
2022-08-05 12:04:23 -07:00
2019-05-23 10:09:12 -07:00
2019-05-23 10:09:12 -07:00
2024-01-23 08:42:50 -08:00
2019-05-23 10:09:12 -07:00
2024-01-23 08:46:37 -08:00
2017-10-19 14:01:14 +02:00