Skip to content

Commit dea3472

Browse files
Copilotprj-
andcommitted
1 parent 9e78bf6 commit dea3472

File tree

4 files changed

+21
-3
lines changed

4 files changed

+21
-3
lines changed

plugin/mpi/PETSc-code.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#include <petsc.h>
22

3+
#if defined(__clang__)
4+
#pragma clang diagnostic push
5+
#pragma clang diagnostic ignored "-Wunused-value"
6+
#endif
7+
38
#include "PETSc.hpp"
49
#include "compositeFESpace.hpp"
510

@@ -6906,3 +6911,7 @@ static void Init_PETSc( ) {
69066911
#ifndef PETScandSLEPc
69076912
LOADFUNC(Init_PETSc)
69086913
#endif
6914+
6915+
#if defined(__clang__)
6916+
#pragma clang diagnostic pop
6917+
#endif

plugin/mpi/SLEPc-code.hpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99

1010
#ifdef WITH_SLEPC
1111

12-
#include "slepc.h"
12+
#include <slepc.h>
13+
14+
#if defined(__clang__)
15+
#pragma clang diagnostic push
16+
#pragma clang diagnostic ignored "-Wunused-value"
17+
#endif
1318

1419
namespace SLEPc {
1520
template<class Type, class K>
@@ -671,3 +676,7 @@ static void Init() {
671676
Init_PETSc();
672677
}
673678
#endif
679+
680+
#if defined(__clang__)
681+
#pragma clang diagnostic pop
682+
#endif

src/fflib/AFunction.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ template<class A>
812812
template<class A> AnyType Initialize(Stack,const AnyType &x){
813813
A * a=PGetAny<A>(x);
814814
A *b=new A;//
815-
memcpy(a,b,sizeof(A));// bitcopy
815+
memcpy((void*)a,b,sizeof(A));// bitcopy
816816
::operator delete(b); // delete with no destruction
817817
return SetPtrAny(a);
818818
}

src/fflib/Operator.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ struct Op2_padd {
201201
using second_argument_type = B;
202202
using result_type = R*;
203203
static R * f(Stack s,const A & a,const B & b) {
204-
R* r= Add2StackOfPtr2Free(s, a || b ? new R ((a ? *a : nullptr) + (b ? *b : nullptr)) : nullptr);
204+
R* r= Add2StackOfPtr2Free(s, a || b ? new R ((a ? *a : R()) + (b ? *b : R())) : nullptr);
205205
// delete a,delete b;
206206
return r;} };
207207

0 commit comments

Comments
 (0)