diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2021-02-09 16:27:41 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2021-02-09 19:41:51 +0100 |
commit | 8f22ce5ea3e62a4837773f6958b8ce7ac96f811a (patch) | |
tree | 255d12a2d154c40cc9b58e25c29f228d73cedacd /sfx2 | |
parent | 2d154d55db925dfa20358faa0302d4d942496aee (diff) |
loplugin:fakebool (clang-cl)
But GetMessageW encodes more than true vs. false in its BOOL return value, so
silence the unhelpful loplugin with auto.
Change-Id: I77d053b760e93f918367532c63a6dfe963faa12d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110645
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/shutdowniconw32.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index 298d84bf7d89..f86476995f1a 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -459,10 +459,14 @@ static DWORD WINAPI SystrayThread( LPVOID /*lpParam*/ ) ); MSG msg; - BOOL bRet; - while ((bRet = GetMessageW(&msg, nullptr, 0, 0)) != 0) + for (;;) { + auto const bRet = GetMessageW(&msg, nullptr, 0, 0); + if (bRet == 0) + { + break; + } if (-1 == bRet) { SAL_WARN("sfx.appl", "GetMessageW failed: " << WindowsErrorString(GetLastError())); |