Addresses Coverity reports for compiler.cpp and other files.
Note that whitespace was reformatted on this PR. You may want to compare
with ignore-whitespace.
Fixes#3084.
This does two things:
1. Cleans up a bunch of places where we used to use `(int)` typecasts
for pointer math, which was problematic. We now use `(INT_PTR)` per
MSDN https://docs.microsoft.com/en-us/windows/win32/winprog64/rules-for-using-pointers
and then cast that down to `(int)` where necessary, e.g. when storing
string lengths which are never going to be more than a few hundred
characters! Doing this explicitly helps to clarify that we are aware
of the typecast and believe it to be safe.
2. Adds in some build infrastructure for future use of Coverity Scan
https://scan.coverity.com/ which we plan to use for further code
quality updates. I have submitted the project to Coverity and are
now waiting for approval so we can check results. Once we have
approval, I do plan to add this to the nightly build (we need to
keep submissions under 3 builds/day).
Note: I have not yet added Keyman Core (Windows) to this project,
nor are we currently building Keyman Core (macOS) or Keyman for
Linux, but we should consider adding those in future.
Fixes#3487.
The fontsize property for touch layout elements was treated as
an integer by Developer but should be a string (as it might contain
units such as 'em').
To help with back-compat, updated the GetValue string overload
to ignore value type and return the stringified form, regardless of
the actual type, which should always work.
Works around #119 on the compiler side. This normalises the touch layout file in the
compile phase, fixing integers which should be strings, etc. This means that
we no longer need to correct the issue in the Engine; a rebuild of affected
keyboards is sufficient (although of course we'll need a version bump in order
for them to be distributed.
Serve all Keyman Configuration dialogs over a local http server
instead of over file protocol. This is more secure and allows for
a bunch of things in the future, including simple online integration
and stable reporting.