From 507031badfc4152cf89ba25283dbab7ca743eaf4 Mon Sep 17 00:00:00 2001 From: Stefan Rueger Date: Wed, 11 Jan 2023 23:18:08 +0000 Subject: [PATCH] Silence compiler warnings in jtagm.c --- src/jtagmkI.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/jtagmkI.c b/src/jtagmkI.c index d35c0925..d19f223c 100644 --- a/src/jtagmkI.c +++ b/src/jtagmkI.c @@ -83,7 +83,7 @@ struct pdata * to try connecting at startup, we keep these two entries on top to * speedup the program start. */ -const static struct { +static const struct { long baud; unsigned char val; } baudtab[] = { @@ -139,11 +139,10 @@ u16_to_b2(unsigned char *b, unsigned short l) } static void jtagmkI_prmsg(const PROGRAMMER *pgm, unsigned char *data, size_t len) { - int i; - if (verbose >= 4) { msg_trace("Raw message:\n"); + size_t i; for (i = 0; i < len; i++) { msg_trace("0x%02x ", data[i]); if (i % 16 == 15) @@ -472,9 +471,7 @@ static int jtagmkI_program_disable(const PROGRAMMER *pgm) { static unsigned char jtagmkI_get_baud(long baud) { - int i; - - for (i = 0; i < sizeof baudtab / sizeof baudtab[0]; i++) + for (size_t i = 0; i < sizeof baudtab / sizeof baudtab[0]; i++) if (baud == baudtab[i].baud) return baudtab[i].val;