[PATCH] Fix uninitialized variable with wrong type

Yuriy Skalko yuriy.skalko at gmail.com
Mon Sep 7 19:17:01 UTC 2020


Hello.

I've fixed a minor issue in LyX code: usage of uninitialized variable,
also its type should be signed.

Patch attached.

Yuriy


>From 33d157a6dd359a8f20b9499342f05e57087f6f57 Mon Sep 17 00:00:00 2001
From: Yuriy Skalko <yuriy.skalko at gmail.com>
Date: Mon, 7 Sep 2020 04:12:54 +0300
Subject: [PATCH] Fix uninitialized variable with wrong type

---
 src/support/filetools.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp
index d6b27856cb..deb8cdeea6 100644
--- a/src/support/filetools.cpp
+++ b/src/support/filetools.cpp
@@ -1107,7 +1107,7 @@ cmd_ret const runCommand(string const & cmd)

 #if defined (_WIN32)
 	WaitForSingleObject(process.hProcess, INFINITE);
-	DWORD pret;
+	int pret = 0;
 	if (!GetExitCodeProcess(process.hProcess, &pret))
 		pret = -1;
 	if (!infile.empty())
-- 
2.28.0.windows.1



More information about the lyx-devel mailing list