From 44c989aedd658ee86e88f17e8fde4fc678086b17 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 18 Feb 2009 01:00:25 +0000 Subject: [PATCH] fix compiler warnings in mpc824x bus code git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1437 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- jtag/ChangeLog | 5 +++++ jtag/src/bus/mpc824x.c | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) 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);