X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=ao-tools%2Flib%2Fao-hex.c;fp=ao-tools%2Flib%2Fao-hex.c;h=73f3d7bed61dde5534fe03631ff62e4b563f49c9;hp=2ceed7ab4f2ba9e1791c3283e23b735e93a2aaea;hb=6f729ff46b2f4531db68f0af85e7e9fe0f6d1969;hpb=f14c799ae7ff3be56c28f5694f04c03daff7708e diff --git a/ao-tools/lib/ao-hex.c b/ao-tools/lib/ao-hex.c index 2ceed7ab..73f3d7be 100644 --- a/ao-tools/lib/ao-hex.c +++ b/ao-tools/lib/ao-hex.c @@ -113,9 +113,9 @@ ao_hex_read_record(struct ao_hex_input *input) struct ao_hex_record *record = NULL; enum ao_hex_read_state state = read_marker; char c; - int nhexbytes; - uint32_t hex; - uint32_t ndata; + int nhexbytes = 0; + uint32_t hex = 0; + uint32_t ndata = 0; uint8_t checksum; while (state != read_done) { @@ -451,8 +451,8 @@ ao_hex_image_free(struct ao_hex_image *image) free(image); } -uint32_t min(uint32_t a, uint32_t b) { return a < b ? a : b; } -uint32_t max(uint32_t a, uint32_t b) { return a > b ? a : b; } +static uint32_t min(uint32_t a, uint32_t b) { return a < b ? a : b; } +static uint32_t max(uint32_t a, uint32_t b) { return a > b ? a : b; } struct ao_hex_image * ao_hex_image_cat(struct ao_hex_image *a, struct ao_hex_image *b)