Fix use after free (realloc) in ParseText.cpp

Static analysis detected a use after free (realloc).  The
member variable should use the new string address, and it
is assigned the new string address after the usage.  This
looks to be a copy/paste error sometime in the past.  In
addition, follow the stated convention and null terminate
the string, just in case.
(cherry picked from commit df4aef6acf73e31f6399ce4c30c2d508e26c72a1)

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>

Fixes #11556
Patch for (potential) uninitalized variable num_lines

Static analysis indicates that there is a feasible
code path in LayoutParagraphs (called in GetNarrowWidth)
which will not result in calling Layout which will
initialize the variable num_lines.  Initialize the
variable num_lines just in case (and make the
analyzer happy).
(cherry picked from commit a5388fb30e8fce9b8875563d3b1382a2888fcc2c)

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>

Fixes #11553
Fix static analysis detected use without assignment

In ClassicCommDetector.cpp, static analysis indicates that
the variable currentFrameNumber could be used without
previously assigning it a value if certain code feasible
code paths are taken.  Assign it the value 0 at declaration.
(cherry picked from commit d2a021c29cf7d8bb4c13dd340654e61b4a16c8da)

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>

Fixes #11552
Check the return code from setsockopt (in lirc.cpp)

Static analysis (coverity) identified that the return code
from setsockopt was not checked.  This patch checks the
return code, with a log message if the setting fails.
(cherry picked from commit 0ae45b8598110898f4779f3bdc826e1ce5abb005)

Signed-off-by: Stuart Morgan <smorgan@mythtv.org>

Fixes #11550