From 9e8966483f6cf6364dcdbaa955fbc7e258dcc59d Mon Sep 17 00:00:00 2001 From: Danial Khazaei Date: Mon, 8 Jul 2019 19:08:47 +0430 Subject: [PATCH] [bugfix]: writing to an object with no trivial copy-assignment [wclass-memaccess]. --- .../constraint/processor/ProcessorPointPatchField.C | 2 +- .../processorLduInterface/processorLduInterfaceTemplates.C | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/foam/fields/PointPatchFieldTemplates/constraint/processor/ProcessorPointPatchField.C b/src/foam/fields/PointPatchFieldTemplates/constraint/processor/ProcessorPointPatchField.C index 603211464..346951975 100644 --- a/src/foam/fields/PointPatchFieldTemplates/constraint/processor/ProcessorPointPatchField.C +++ b/src/foam/fields/PointPatchFieldTemplates/constraint/processor/ProcessorPointPatchField.C @@ -170,7 +170,7 @@ receivePointField outstandingSendRequest_ = -1; outstandingRecvRequest_ = -1; - memcpy(tf().begin(), receiveBuf_.begin(), tf().byteSize()); + memcpy(static_cast(tf().begin()), receiveBuf_.begin(), tf().byteSize()); } else { diff --git a/src/foam/matrices/lduMatrix/lduAddressing/lduInterfaces/processorLduInterface/processorLduInterfaceTemplates.C b/src/foam/matrices/lduMatrix/lduAddressing/lduInterfaces/processorLduInterface/processorLduInterfaceTemplates.C index 9cc74ee76..1896b1056 100644 --- a/src/foam/matrices/lduMatrix/lduAddressing/lduInterfaces/processorLduInterface/processorLduInterfaceTemplates.C +++ b/src/foam/matrices/lduMatrix/lduAddressing/lduInterfaces/processorLduInterface/processorLduInterfaceTemplates.C @@ -107,7 +107,7 @@ void Foam::processorLduInterface::receive } else if (commsType == Pstream::nonBlocking) { - memcpy(f.begin(), receiveBuf_.begin(), f.byteSize()); + memcpy(static_cast(f.begin()), receiveBuf_.begin(), f.byteSize()); } else {