novatek-tcon-fw-update-tool: Fix all compilation warnings and remove -w.

This effectively enables -Wall, which common.mk sets by default.

This adds return value checking to more file operations than required by
compiler warnings, which only required some.  Otherwise all changes were
required to avoid warnings.

In general, the least intrusive possible change to avoid warnings was made,
plus error messages when appropriate.  For example, instead of replacing
sprintf() with snprintf(), buffer overflow is avoided by adjusting buffer
sizes.  Any further cleanup is outside the scope of this change.

BUG=b:112485400
TEST=build_packages and direct make invocation both continue to succeed.

Change-Id: I962aa299ff079aa4f9e5b50934469e1f0978287d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/novatek-tcon-fw-update-tool/+/1965838
Commit-Queue: Matthew Blecker <matthewb@chromium.org>
Tested-by: Matthew Blecker <matthewb@chromium.org>
Reviewed-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Grant Grundler <grundler@chromium.org>
4 files changed
tree: 118611688966d42d43f271c4187a75d9af148316
  1. src/
  2. .gitignore
  3. common.mk
  4. LICENSE
  5. Makefile
  6. OWNERS