[linux-nfc] [neard][PATCH v2 50/73] unit: use proper pointer to uint8_t in test_snep_read_recv_fragments()

Krzysztof Kozlowski <[email protected]> Mon, 19 Jul 2021 13:07:56 +0200
Newsgroups org.01.lists.linux-nfc,dev.linux.lists.oe-linux-nfc
Message-ID <[email protected]>
Raw data bytes should be passed as pointer to uint8_t and the calling
function already uses that type.  This fixes warning:

    unit/test-snep-read.c: In function ‘test_snep_read_recv_fragments’:
    unit/test-snep-read.c:408:21: error: pointer of type ‘void *’ used in arithmetic [-Werror=pointer-arith]
      408 |   memcpy(data_recvd + offset, resp, nbytes);
          |                     ^

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
 unit/test-snep-read.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/unit/test-snep-read.c b/unit/test-snep-read.c
index 5511fecf5c17..78db58ba859f 100644
--- a/unit/test-snep-read.c
+++ b/unit/test-snep-read.c
@@ -386,7 +386,7 @@ static bool test_snep_read_send_fragment(size_t frag_len,
  * @param[out] data             Must be preallocated
  */
 static void test_snep_read_recv_fragments(uint32_t frag_len,
-				uint32_t remaining_bytes, void *data_recvd)
+				uint32_t remaining_bytes, uint8_t *data_recvd)
 {
 	struct p2p_snep_resp_frame *resp;
 	uint32_t offset = 0;
-- 
2.27.0
_______________________________________________
Linux-nfc mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s