Skip to content

Commit

Permalink
bsock_mock.h: avoid warnings with clang
Browse files Browse the repository at this point in the history
  • Loading branch information
pstorz authored and franku committed Nov 5, 2019
1 parent 1493c19 commit 1675b76
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion core/src/tests/bsock_mock.h
Expand Up @@ -37,9 +37,14 @@

#include <algorithm>

#ifdef __GNUC__
#ifndef __clang__
/* ignore the suggest-override warnings caused by MOCK_METHODx */
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wsuggest-override"
#endif
#endif

class BareosSocketMock : public BareosSocket {
public:
BareosSocketMock() : BareosSocket() {}
Expand Down Expand Up @@ -85,8 +90,11 @@ class BareosSocketMock : public BareosSocket {
utime_t,
int*));
};
#ifdef __GNUC__
#ifndef __clang__
#pragma GCC diagnostic pop

#endif
#endif
/* define a gmock action that fills bsock->msg so we can recv() a message */
ACTION_P2(BareosSocket_Recv, bsock, msg)
{
Expand Down

0 comments on commit 1675b76

Please sign in to comment.