diff options
author | Keith Packard <keithp@keithp.com> | 2019-01-03 11:41:49 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2019-01-03 12:09:58 -0800 |
commit | 6f729ff46b2f4531db68f0af85e7e9fe0f6d1969 (patch) | |
tree | d0a93a48bd3012decbb230f5aa17ecc6c793cad2 /ao-tools/lib | |
parent | f14c799ae7ff3be56c28f5694f04c03daff7708e (diff) |
ao-tools: Fix warnings in ao-tools
None of these appear likely to have caused actual problems.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/lib')
-rw-r--r-- | ao-tools/lib/ao-editaltos.c | 2 | ||||
-rw-r--r-- | ao-tools/lib/ao-hex.c | 10 | ||||
-rw-r--r-- | ao-tools/lib/cc-convert.c | 3 | ||||
-rw-r--r-- | ao-tools/lib/cc-logfile.c | 4 | ||||
-rw-r--r-- | ao-tools/lib/cc-process.c | 4 | ||||
-rw-r--r-- | ao-tools/lib/cc-usbdev.c | 2 |
6 files changed, 10 insertions, 15 deletions
diff --git a/ao-tools/lib/ao-editaltos.c b/ao-tools/lib/ao-editaltos.c index 06009653..a51b7dbe 100644 --- a/ao-tools/lib/ao-editaltos.c +++ b/ao-tools/lib/ao-editaltos.c @@ -53,8 +53,6 @@ int ao_num_symbols = NUM_SYMBOLS; static bool rewrite(struct ao_hex_image *load, unsigned address, uint8_t *data, int length) { - int i; - if (address < load->address || load->address + load->length < address + length) return false; 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) diff --git a/ao-tools/lib/cc-convert.c b/ao-tools/lib/cc-convert.c index 0f7fa809..4a7e52fc 100644 --- a/ao-tools/lib/cc-convert.c +++ b/ao-tools/lib/cc-convert.c @@ -213,9 +213,6 @@ cc_pressure_to_altitude(double pressure) * 2.82V * 2047 / 3.3 counts/V = 1749 counts/115 kPa */ -static const double counts_per_kPa = 27 * 2047 / 3300; -static const double counts_at_101_3kPa = 1674.0; - double cc_barometer_to_pressure(double count) { diff --git a/ao-tools/lib/cc-logfile.c b/ao-tools/lib/cc-logfile.c index 88ddda58..c193b1c7 100644 --- a/ao-tools/lib/cc-logfile.c +++ b/ao-tools/lib/cc-logfile.c @@ -306,8 +306,8 @@ cc_log_read(FILE *file) { struct cc_flightraw *f; char line[8192]; - double ground_pres; - int ground_pres_count; + double ground_pres = 0.0; + int ground_pres_count = 0; f = calloc(1, sizeof (struct cc_flightraw)); if (!f) diff --git a/ao-tools/lib/cc-process.c b/ao-tools/lib/cc-process.c index 74b02a74..f2307a82 100644 --- a/ao-tools/lib/cc-process.c +++ b/ao-tools/lib/cc-process.c @@ -46,8 +46,8 @@ struct cc_flightcooked * cc_flight_cook(struct cc_flightraw *raw) { struct cc_flightcooked *cooked; - double flight_start; - double flight_stop; + double flight_start = 0; + double flight_stop = 0; int start_set = 0; int stop_set = 0; int i; diff --git a/ao-tools/lib/cc-usbdev.c b/ao-tools/lib/cc-usbdev.c index 6c3ba591..b1761700 100644 --- a/ao-tools/lib/cc-usbdev.c +++ b/ao-tools/lib/cc-usbdev.c @@ -102,7 +102,7 @@ usb_tty(char *sys) struct dirent **namelist; int interface; int num_interfaces; - char endpoint_base[20]; + char endpoint_base[64]; char *endpoint_full; char *tty_dir; int ntty; |