https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9a93d2fe3aa11afa871a2…
commit 9a93d2fe3aa11afa871a2745019e9618da73c665
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Wed Apr 21 18:45:35 2021 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed May 5 17:24:12 2021 +0200
[CONSRV] Fix uninitialized variables warnings detected by Clang. (#3619)
CORE-17545
Fix 3 warnings:
win32ss/user/winsrv/consrv/alias.c:648:16: warning: variable 'Status' is used
uninitialized whenever 'while' loop exits because its condition is false
[-Wsometimes-uninitialized]
while (CurEntry)
^~~~~~~~
win32ss/user/winsrv/consrv/alias.c:693:12: note: uninitialized use occurs here
return Status;
^~~~~~
win32ss/user/winsrv/consrv/alias.c:715:9: warning: variable 'Status' is used
uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (Header)
^~~~~~
win32ss/user/winsrv/consrv/alias.c:727:12: note: uninitialized use occurs here
return Status;
^~~~~~
win32ss/user/winsrv/consrv/alias.c:771:16: warning: variable 'Status' is used
uninitialized whenever 'while' loop exits because its condition is false
[-Wsometimes-uninitialized]
while (RootHeader)
^~~~~~~~~~
win32ss/user/winsrv/consrv/alias.c:807:12: note: uninitialized use occurs here
return Status;
---
win32ss/user/winsrv/consrv/alias.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/win32ss/user/winsrv/consrv/alias.c b/win32ss/user/winsrv/consrv/alias.c
index 87134679181..ebe976481b0 100644
--- a/win32ss/user/winsrv/consrv/alias.c
+++ b/win32ss/user/winsrv/consrv/alias.c
@@ -594,7 +594,7 @@ CON_API(SrvGetConsoleAlias,
CON_API(SrvGetConsoleAliases,
CONSOLE_GETALLALIASES, GetAllAliasesRequest)
{
- NTSTATUS Status;
+ NTSTATUS Status = STATUS_SUCCESS;
ULONG BytesWritten = 0;
PALIAS_HEADER Header;
@@ -697,7 +697,7 @@ Quit:
CON_API(SrvGetConsoleAliasesLength,
CONSOLE_GETALLALIASESLENGTH, GetAllAliasesLengthRequest)
{
- NTSTATUS Status;
+ NTSTATUS Status = STATUS_SUCCESS;
PALIAS_HEADER Header;
if (!CsrValidateMessageBuffer(ApiMessage,
@@ -731,7 +731,7 @@ CON_API(SrvGetConsoleAliasesLength,
CON_API(SrvGetConsoleAliasExes,
CONSOLE_GETALIASESEXES, GetAliasesExesRequest)
{
- NTSTATUS Status;
+ NTSTATUS Status = STATUS_SUCCESS;
UINT BytesWritten = 0;
if (!CsrValidateMessageBuffer(ApiMessage,