https://git.reactos.org/?p=reactos.git;a=commitdiff;h=abd4c818dc26802a01a04…
commit abd4c818dc26802a01a044d054702741b21f2965
Author:     Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Wed Apr 21 19:48:58 2021 +0200
Commit:     Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Wed May 5 17:24:14 2021 +0200
    [CSRSRV] Fix uninitialized variable warning detected by Clang. (#3619)
    CORE-17545
    subsystems/win32/csrsrv/api.c:63:9: warning: variable 'ServerDll' is used
uninitialized whenever '||' condition is true [-Wsometimes-uninitialized]
        if ((ServerId >= CSR_SERVER_DLL_MAX) ||
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    subsystems/win32/csrsrv/api.c:67:76: note: uninitialized use occurs here
            DPRINT1("CSRSS: %lx is invalid ServerDllIndex (%08x)\n", ServerId,
ServerDll);
                                                                               ^~~~~~~~~
---
 subsystems/win32/csrsrv/api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/subsystems/win32/csrsrv/api.c b/subsystems/win32/csrsrv/api.c
index 39229a1b384..07b8db3749c 100644
--- a/subsystems/win32/csrsrv/api.c
+++ b/subsystems/win32/csrsrv/api.c
@@ -52,7 +52,7 @@ CsrCallServerFromServer(IN PCSR_API_MESSAGE ReceiveMsg,
                         IN OUT PCSR_API_MESSAGE ReplyMsg)
 {
     ULONG ServerId;
-    PCSR_SERVER_DLL ServerDll;
+    PCSR_SERVER_DLL ServerDll = NULL;
     ULONG ApiId;
     CSR_REPLY_CODE ReplyCode = CsrReplyImmediately;