Silence compiler warnings in jtagm.c

This commit is contained in:
Stefan Rueger 2023-01-11 23:18:08 +00:00
parent 6d15d24a4d
commit 507031badf
No known key found for this signature in database
GPG Key ID: B0B4F1FD86B1EC55
1 changed files with 3 additions and 6 deletions

View File

@ -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;