[PATCH] Fix uninitialized variable with wrong type
Jean-Marc Lasgouttes
lasgouttes at lyx.org
Thu Sep 10 15:53:56 UTC 2020
Le 10/09/2020 à 14:30, Yuriy Skalko a écrit :
> Yes, it solves this issue, but adding variable for this is not clean
> enough as for me :)
> Here is another not-so-clean solution with reinterpret_cast:
I do not see how returning an int valie which has different
interpretations depending on the OS can be clean. I would propose to
change the first element of cmd_ret with a boolean (if this is enough)
or an enum (if we return more detailed information) and compute this
value cleanly in each branch.
Or spend this time implementing the following advice (no idea how easy
it is):
// FIXME: replace all calls to RunCommand with ForkedCall
// (if the output is not needed) or the code in ISpell.cpp
// (if the output is needed).
JMarc
More information about the lyx-devel
mailing list