https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9a614c82e126861eb5fe5…
commit 9a614c82e126861eb5fe59be0acc7930477a9d3a
Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com>
AuthorDate: Wed May 27 17:05:33 2020 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Wed May 27 17:05:33 2020 +0200
[LABEL] wmain(): Initialize 'szBuffer' (#2867)
Detected by Cppcheck: uninitvar.
---
base/applications/cmdutils/label/label.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/base/applications/cmdutils/label/label.c
b/base/applications/cmdutils/label/label.c
index 6011f3d3549..fc4d8f9d0cd 100644
--- a/base/applications/cmdutils/label/label.c
+++ b/base/applications/cmdutils/label/label.c
@@ -142,8 +142,8 @@ PromptYesNo(VOID)
int wmain(int argc, WCHAR *argv[])
{
WCHAR szRootPath[] = L" :\\";
- WCHAR szBuffer[80];
- WCHAR szLabel[80];
+ WCHAR szBuffer[80] = L"";
+ WCHAR szLabel[80] = L"";
WCHAR szOldLabel[80];
DWORD dwSerialNr;
INT len, i;
@@ -151,9 +151,6 @@ int wmain(int argc, WCHAR *argv[])
/* Initialize the Console Standard Streams */
ConInitStdStreams();
- /* set empty label string */
- szLabel[0] = UNICODE_NULL;
-
/* print help */
if (argc > 1 && wcscmp(argv[1], L"/?") == 0)
{