diff options
author | Chris Lumens <clumens@redhat.com> | 2005-03-01 16:27:14 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2005-03-01 16:27:14 +0000 |
commit | 258dceb2feea2716d996757f7c8d9594391663c4 (patch) | |
tree | 6892bfcfa8cd87d8fef7caf3575ad4e4819df62c | |
parent | 065ecf29a264fdaec6c402afd0d853c7713bf61b (diff) | |
download | anaconda-258dceb2feea2716d996757f7c8d9594391663c4.tar.gz anaconda-258dceb2feea2716d996757f7c8d9594391663c4.tar.xz anaconda-258dceb2feea2716d996757f7c8d9594391663c4.zip |
Fix nested case statements in a switch to silence a gcc4 warning.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | loader2/driverdisk.c | 15 |
2 files changed, 15 insertions, 5 deletions
@@ -1,3 +1,8 @@ +2005-03-01 Chris Lumens <clumens@redhat.com> + + * loader2/driverdisk.c: Fix nested case statements in a switch to + silence a gcc4 warning. + 2005-02-28 Chris Lumens <clumens@redhat.com> * anaconda.spec: Bump version. 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; } |