mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
[SYSDM] Fix uninitialized variables warnings detected by Clang. (#3619)
CORE-17545
Addendum to commit d635ce0c
.
dll/cpl/sysdm/general.c:156:25: warning: variable 'hCreditsDC' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (hDC == NULL)
^~~~~~~~~~~
dll/cpl/sysdm/general.c:216:25: note: uninitialized use occurs here
if (hCreditsDC != NULL) DeleteDC(hCreditsDC);
^~~~~~~~~~
and the same for hLogoDC:
dll/cpl/sysdm/general.c:215:25: note: uninitialized use occurs here
if (hLogoDC != NULL) DeleteDC(hLogoDC);
^~~~~~~
This commit is contained in:
parent
cba0d64645
commit
ab8d7f2548
1 changed files with 4 additions and 3 deletions
|
@ -148,19 +148,21 @@ LRESULT CALLBACK RosImageProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
{
|
||||
if (timerid == 0)
|
||||
{
|
||||
HDC hCreditsDC, hLogoDC;
|
||||
HDC hDC = GetDC(NULL);
|
||||
HDC hDC;
|
||||
HDC hCreditsDC = NULL, hLogoDC = NULL;
|
||||
HFONT hFont = NULL;
|
||||
NONCLIENTMETRICS ncm;
|
||||
RECT rcCredits;
|
||||
TCHAR szCredits[2048];
|
||||
INT iDevsHeight;
|
||||
|
||||
hDC = GetDC(NULL);
|
||||
if (hDC == NULL)
|
||||
goto Cleanup;
|
||||
|
||||
top = 0;
|
||||
offset = 0;
|
||||
|
||||
hCreditsDC = CreateCompatibleDC(hDC);
|
||||
hLogoDC = CreateCompatibleDC(hCreditsDC);
|
||||
|
||||
|
@ -183,7 +185,6 @@ LRESULT CALLBACK RosImageProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
|||
iDevsHeight = rcCredits.bottom - rcCredits.top;
|
||||
|
||||
hCreditsBitmap = CreateBitmap(pImgInfo->cxSource, (2 * pImgInfo->cySource) + iDevsHeight + 1, pImgInfo->iPlanes, pImgInfo->iBits, NULL);
|
||||
|
||||
if (!hCreditsBitmap)
|
||||
goto Cleanup;
|
||||
|
||||
|
|
Loading…
Reference in a new issue