firmware-utils: fix dgn3500sum compiler warnings
authorMathias Kresin <dev@kresin.me>
Mon, 26 Jun 2017 17:22:52 +0000 (19:22 +0200)
committerMathias Kresin <dev@kresin.me>
Mon, 26 Jun 2017 18:08:36 +0000 (20:08 +0200)
commit06741411e020bb28160ddd42149d6a489800dbc7
tree353b36569c688cac8ac14e2ea16702f5ac5f8600
parentf33de8023228d7d6545ff12c4f2ef8febb486f37
firmware-utils: fix dgn3500sum compiler warnings

The sum variable need to be initialised, otherwise it will points to
random stack memory and a bogus image checksum might be calculated.

While at it, fix the segfault in case the product region code isn't
specified and enable compiler warnings which had revealed all the code
issues.

Signed-off-by: Mathias Kresin <dev@kresin.me>
tools/firmware-utils/Makefile
tools/firmware-utils/src/dgn3500sum.c