[PATCH] Fix uninitialized variable with wrong type
Kornel Benko
kornel at lyx.org
Mon Sep 7 19:54:12 UTC 2020
Am Mon, 7 Sep 2020 22:17:01 +0300
schrieb Yuriy Skalko <yuriy.skalko at gmail.com>:
> 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())
There is also GetExitCodeProcess() in src/support/ForkedCalls.cpp.
Kornel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20200907/865585a7/attachment-0001.asc>
More information about the lyx-devel
mailing list