Skip to content

Commit

Permalink
Fix appveyor of MSVC for __RPC_CALLEE
Browse files Browse the repository at this point in the history
Looks like some versions do not accept __RPC_CALLEE.
Otherwise the clang compiler for Windows will output a warning
like this:

src\core\SignalHandler.cpp(46,25):  error: cast between incompatible calling conventions 'cdecl' and 'stdcall'; calls through this pointer may abort at runtime [-Werror,-Wcast-calling-convention]
           SetConsoleCtrlHandler(PHANDLER_ROUTINE(ctrlHandler), true);

\src\core\SignalHandler.h(48,15):  note: consider defining 'ctrlHandler' with the 'stdcall' calling convention
               static BOOL ctrlHandler(DWORD pCtrlType);
                           ^
                           __RPC_CALLEE
  • Loading branch information
misery committed Jan 7, 2019
1 parent 84d957f commit 806a4dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/SignalHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class SignalHandler
#elif defined(Q_OS_WIN)

private:
static BOOL __RPC_CALLEE ctrlHandler(DWORD pCtrlType);
static BOOL WINAPI ctrlHandler(DWORD pCtrlType);
#endif

private Q_SLOTS:
Expand Down
2 changes: 1 addition & 1 deletion src/core/SignalHandler_win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ using namespace governikus;
Q_DECLARE_LOGGING_CATEGORY(system)


BOOL __RPC_CALLEE SignalHandler::ctrlHandler(DWORD pCtrlType)
BOOL WINAPI SignalHandler::ctrlHandler(DWORD pCtrlType)
{
qCWarning(system) << "Got signal:" << pCtrlType;

Expand Down

0 comments on commit 806a4dc

Please sign in to comment.