mirror of
https://github.com/reactos/reactos.git
synced 2024-12-31 19:42:51 +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)
|
if (timerid == 0)
|
||||||
{
|
{
|
||||||
HDC hCreditsDC, hLogoDC;
|
HDC hDC;
|
||||||
HDC hDC = GetDC(NULL);
|
HDC hCreditsDC = NULL, hLogoDC = NULL;
|
||||||
HFONT hFont = NULL;
|
HFONT hFont = NULL;
|
||||||
NONCLIENTMETRICS ncm;
|
NONCLIENTMETRICS ncm;
|
||||||
RECT rcCredits;
|
RECT rcCredits;
|
||||||
TCHAR szCredits[2048];
|
TCHAR szCredits[2048];
|
||||||
INT iDevsHeight;
|
INT iDevsHeight;
|
||||||
|
|
||||||
|
hDC = GetDC(NULL);
|
||||||
if (hDC == NULL)
|
if (hDC == NULL)
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
|
|
||||||
top = 0;
|
top = 0;
|
||||||
offset = 0;
|
offset = 0;
|
||||||
|
|
||||||
hCreditsDC = CreateCompatibleDC(hDC);
|
hCreditsDC = CreateCompatibleDC(hDC);
|
||||||
hLogoDC = CreateCompatibleDC(hCreditsDC);
|
hLogoDC = CreateCompatibleDC(hCreditsDC);
|
||||||
|
|
||||||
|
@ -183,7 +185,6 @@ LRESULT CALLBACK RosImageProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam
|
||||||
iDevsHeight = rcCredits.bottom - rcCredits.top;
|
iDevsHeight = rcCredits.bottom - rcCredits.top;
|
||||||
|
|
||||||
hCreditsBitmap = CreateBitmap(pImgInfo->cxSource, (2 * pImgInfo->cySource) + iDevsHeight + 1, pImgInfo->iPlanes, pImgInfo->iBits, NULL);
|
hCreditsBitmap = CreateBitmap(pImgInfo->cxSource, (2 * pImgInfo->cySource) + iDevsHeight + 1, pImgInfo->iPlanes, pImgInfo->iBits, NULL);
|
||||||
|
|
||||||
if (!hCreditsBitmap)
|
if (!hCreditsBitmap)
|
||||||
goto Cleanup;
|
goto Cleanup;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue