tools: kwbimage: Fix arithmetic with void pointers
authorMario Six <mario.six@gdsys.cc>
Wed, 11 Jan 2017 15:00:55 +0000 (16:00 +0100)
committerStefan Roese <sr@denx.de>
Wed, 1 Feb 2017 08:03:48 +0000 (09:03 +0100)
commit885fba155c70871cfbe83f13ed98cd804a049058
tree2a68f088fd1eba2334efef58d0877b06d1abc38b
parent94490a4a707003f91cc384f367131ad91b82fd0e
tools: kwbimage: Fix arithmetic with void pointers

Arithmetic with void pointers, e.g. a - b where both a and b are void
pointers, is undefined in the C standard. Since we are operating with
byte data here, we switch the void pointers to uint8_t pointers, and add
the necessary casts.

Signed-off-by: Mario Six <mario.six@gdsys.cc>
Reviewed-by: Stefan Roese <sr@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
tools/kwbimage.c