diff options
-rw-r--r-- | embedserv/source/embed/tracker.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/appl/shutdowniconw32.cxx | 8 | ||||
-rw-r--r-- | vcl/win/dtrans/MtaOleClipb.cxx | 10 | ||||
-rw-r--r-- | vcl/win/dtrans/target.cxx | 8 |
4 files changed, 20 insertions, 8 deletions
diff --git a/embedserv/source/embed/tracker.cxx b/embedserv/source/embed/tracker.cxx index dbe114660f61..2a736c39b05f 100644 --- a/embedserv/source/embed/tracker.cxx +++ b/embedserv/source/embed/tracker.cxx @@ -405,7 +405,7 @@ BOOL Tracker::TrackHandle(int nHandle,HWND hWnd,POINT point,HWND hWndClipTo) for (;;) { MSG msg; - BOOL bRet = GetMessageW(&msg, nullptr, 0, 0); + auto const bRet = GetMessageW(&msg, nullptr, 0, 0); SAL_WARN_IF(-1 == bRet, "embedserv", "GetMessageW failed: " << WindowsErrorString(GetLastError())); if (-1 == bRet || 0 == bRet) break; 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())); diff --git a/vcl/win/dtrans/MtaOleClipb.cxx b/vcl/win/dtrans/MtaOleClipb.cxx index f6e471925516..3898bdc30dfb 100644 --- a/vcl/win/dtrans/MtaOleClipb.cxx +++ b/vcl/win/dtrans/MtaOleClipb.cxx @@ -654,10 +654,14 @@ unsigned int CMtaOleClipboard::run( ) nRet = 0; // pumping messages - MSG msg; - BOOL bRet; - while ((bRet = GetMessageW(&msg, nullptr, 0, 0)) != 0) + for (;;) { + MSG msg; + auto const bRet = GetMessageW(&msg, nullptr, 0, 0); + if (bRet == 0) + { + break; + } if (-1 == bRet) { SAL_WARN("vcl.win.dtrans", "GetMessageW failed: " << WindowsErrorString(GetLastError())); diff --git a/vcl/win/dtrans/target.cxx b/vcl/win/dtrans/target.cxx index 45a8515bd414..2492c8a3cc94 100644 --- a/vcl/win/dtrans/target.cxx +++ b/vcl/win/dtrans/target.cxx @@ -208,9 +208,13 @@ DWORD WINAPI DndTargetOleSTAFunc(LPVOID pParams) DWORD threadId= GetCurrentThreadId(); // We force the creation of a thread message queue. This is necessary // for a later call to AttachThreadInput - 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("vcl.win.dtrans", "GetMessageW failed: " << WindowsErrorString(GetLastError())); |