Skip to content

Commit

Permalink
fix -Wclass-memaccess
Browse files Browse the repository at this point in the history
  • Loading branch information
MadVitaliy committed Aug 2, 2024
1 parent 21553b6 commit 3be47f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Source/DataStructureAndEncodingDefinition/gdcmElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ class Element<TVR, VM::VM1_n>
Save = true; // ????
if( Internal )
{
memcpy(internal, Internal, len);
memcpy((void*)internal, (void*)Internal, Length);
delete[] Internal;
}
Internal = internal;
Expand All @@ -622,7 +622,7 @@ class Element<TVR, VM::VM1_n>
bool save = false) {
if( save ) {
SetLength(len); // realloc
memcpy(Internal, array, len/*/sizeof(Type)*/);
memcpy((void*)Internal, (void*)array, len/*/sizeof(Type)*/);
assert( Save == false );
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ int TestAT()
list[0] = Tag(0x0010,0x0010);
list[1] = Tag(0x0010,0x0020);
list[2] = Tag(0x0020,0x0013);
memcpy(&a, list, sizeof(list));
memcpy((void*)&a, (void*)list, sizeof(list));
a.Print( std::cout );
std::cout << std::endl;

Expand Down

0 comments on commit 3be47f8

Please sign in to comment.