Skip to content

Commit

Permalink
Suppress multiple-modes warnings for dryrun type programmers
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanrueger committed Nov 4, 2023
1 parent cf4285f commit 84e7ff1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,7 @@ int main(int argc, char * argv [])
exit(0);
}

PROGRAMMER *dry = locate_programmer(programmers, "dryrun");
for(LNODEID ln1 = lfirst(part_list); ln1; ln1 = lnext(ln1)) {
AVRPART *p = ldata(ln1);
for(LNODEID ln2 = lfirst(programmers); ln2; ln2 = lnext(ln2)) {
Expand All @@ -1040,7 +1041,7 @@ int main(int argc, char * argv [])
continue;
const char *pnam = pgm->id? ldata(lfirst(pgm->id)): "???";
int pm = pgm->prog_modes & p->prog_modes;
if((pm & (pm-1)) && !str_eq(pnam, "dryrun"))
if((pm & (pm-1)) && !str_eq(pnam, "dryrun") && !(dry && pgm->initpgm == dry->initpgm))
pmsg_warning("%s and %s share multiple modes (%s)\n", pnam, p->desc, avr_prog_modes(pm));
}
}
Expand Down

0 comments on commit 84e7ff1

Please sign in to comment.