Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit c64315c

Browse files
committed
Klocwork fix: avoiding using memcpy
This patch reworks the code to avoid using the memcpy function. Signed-off-by: Thomas Cahuzac <[email protected]>
1 parent 89f1f17 commit c64315c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test-subsystem/TESTSubsystemBinary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ std::string CTESTSubsystemBinary::toString(const void *pvValue, size_t size) con
5353

5454
assert(size <= sizeof(uiValue));
5555

56-
memcpy(&uiValue, pvValue, size);
56+
uiValue = *static_cast<const uint32_t *>(pvValue);
5757

5858
strStream << "0x" << std::hex << uiValue;
5959

0 commit comments

Comments
 (0)