Skip to content

Commit da7ce52

Browse files
[flang] Fix a warning
This patch fixes: flang-rt/lib/runtime/descriptor.cpp:30:19: error: first argument in call to 'memcpy' is a pointer to non-trivially copyable type 'Fortran::runtime::Descriptor' [-Werror,-Wnontrivial-memcall]
1 parent 794f82e commit da7ce52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang-rt/lib/runtime/descriptor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RT_OFFLOAD_API_GROUP_BEGIN
2727
RT_API_ATTRS Descriptor::Descriptor(const Descriptor &that) { *this = that; }
2828

2929
RT_API_ATTRS Descriptor &Descriptor::operator=(const Descriptor &that) {
30-
runtime::memcpy(this, &that, that.SizeInBytes());
30+
runtime::memcpy(reinterpret_cast<void *>(this), &that, that.SizeInBytes());
3131
return *this;
3232
}
3333

0 commit comments

Comments
 (0)