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)
commita882aed4da83ebb5aaebaaeea14c4f6fb9923f53
treeeaa111403696355b491e15a447c02dfb9ee1489c
parent79e8673c9f75c64edb8c019bb1dca233a4e7a853
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>
Makefile
src/dgn3500sum.c