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:11:16 +0000 (20:11 +0200)
commit6c03b293bb2ba86f22ea6e20dd0266892932f585
tree76a9346cc21fcaa961f3a6d3fc4e10ccccf63cd9
parent73a4568f19381ee762816d66b69c0f0b7d1c1c98
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