From 258dceb2feea2716d996757f7c8d9594391663c4 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Tue, 1 Mar 2005 16:27:14 +0000 Subject: Fix nested case statements in a switch to silence a gcc4 warning. --- loader2/driverdisk.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'loader2') diff --git a/loader2/driverdisk.c b/loader2/driverdisk.c index 6b1928d54..ff60f4c1b 100644 --- a/loader2/driverdisk.c +++ b/loader2/driverdisk.c @@ -239,6 +239,7 @@ int loadDriverFromMedia(int class, moduleList modLoaded, DEV_DONE } stage = DEV_DEVICE; int rc, num = 0; int dir = 1; + int found = 0, before = 0; while (stage != DEV_DONE) { switch(stage) { @@ -419,9 +420,11 @@ int loadDriverFromMedia(int class, moduleList modLoaded, break; } case DEV_LOAD: { - int found = 0, before = 0; struct device ** devices; + before = 0; + found = 0; + devices = probeDevices(class, BUS_UNSPEC, PROBE_LOADED); if (devices) for(; devices[before]; before++); @@ -445,8 +448,11 @@ int loadDriverFromMedia(int class, moduleList modLoaded, unlink("/tmp/drivers"); umount("/tmp/dpart"); } + } + + case DEV_PROBE: { + struct device ** devices; - case DEV_PROBE: /* if they didn't specify that we should probe, then we should * just fall out */ if (noprobe) { @@ -474,7 +480,7 @@ int loadDriverFromMedia(int class, moduleList modLoaded, "like to manually select the driver, " "continue anyway, or load another " "driver disk?")); - + if (rc == 2) { /* if they choose to continue, just go ahead and continue */ stage = DEV_DONE; @@ -494,8 +500,7 @@ int loadDriverFromMedia(int class, moduleList modLoaded, break; } - - + case DEV_DONE: break; } -- cgit