diff --git a/apfm.cpp b/apfm.cpp index 77c3a3f..e8dad48 100644 --- a/apfm.cpp +++ b/apfm.cpp @@ -586,7 +586,7 @@ int action_rm(int argc, char **argv, Pascal::VolumeEntry *volume) argv += optind; // TODO -- catch errors ? - for (unsigned i = 0; i < argc; ++i) + for (int i = 0; i < argc; ++i) { Pascal::FileEntry *e = volume->fileByName(argv[i]); diff --git a/newfs_pascal.cpp b/newfs_pascal.cpp index 3829f69..28f3736 100644 --- a/newfs_pascal.cpp +++ b/newfs_pascal.cpp @@ -176,14 +176,14 @@ int main(int argc, char **argv) break; case 'f': + format = Device::BlockDevice::ImageType(optarg); + if (format == 0) { - format = Device::BlockDevice::ImageType(optarg); - if (format == 0) - { - std::fprintf(stderr, "Error: `%s' is not a supported disk image format.\n", optarg); - return -1; - } + std::fprintf(stderr, "Error: `%s' is not a supported disk image format.\n", optarg); + return -1; } + break; + case 'b': bootFile = optarg; break;