diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 865015e2..f4a20796 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,8 @@ +2009-02-17 Mike Frysinger + + * src/bus/mpc824x.c (setup_address): Return on unhandled sizes to avoid + compiler warnings. + 2009-02-16 Arnim Laeuger * doc/UrJTAG.txt: some FAQs diff --git a/jtag/src/bus/mpc824x.c b/jtag/src/bus/mpc824x.c index 29bd9f1c..e91b6375 100644 --- a/jtag/src/bus/mpc824x.c +++ b/jtag/src/bus/mpc824x.c @@ -298,6 +298,7 @@ setup_address( bus_t *bus, uint32_t a ) case 8:/* 8-bit data bus */ for (i = 0; i < 23; i++) part_set_signal( p, AR[i], 1, (a >> i) & 1 ); + break; case 32:/* 32-bit data bus */ for (i = 0; i < 21; i++) part_set_signal( p, AR[i], 1, (a >> (i+2)) & 1 ); @@ -305,6 +306,10 @@ setup_address( bus_t *bus, uint32_t a ) case 64: for (i = 0; i < 20; i++) part_set_signal( p, AR[i], 1, (a >> (i+3)) & 1 ); + break; + default: + printf(_("Warning: unhandled bus width: %i\n"), BUS_WIDTH); + return; } /* Just for debugging */ @@ -313,7 +318,8 @@ setup_address( bus_t *bus, uint32_t a ) switch (BUS_WIDTH) { case 8: k = 23; break; case 32: k = 21; break; - case 64: k = 20; + case 64: k = 20; break; + default: return; } printf(_("Addr [%2d:0]: %06X "), k, a);