bin: Clang warning fixes.

* Functions that call exit() should return void
 * char* -> const char*
 * main returns int, not bool.
This commit is contained in:
Augustin Cavalier
2018-06-18 23:18:34 -04:00
parent 9b29611fb8
commit a309b7c3a1
3 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ main(int argc, char** argv)
if (status != B_OK) { if (status != B_OK) {
fprintf(stderr, "%s: Could not prepare the device for modifications: " fprintf(stderr, "%s: Could not prepare the device for modifications: "
"%s\n", kProgramName, strerror(status)); "%s\n", kProgramName, strerror(status));
return false; return 1;
} }
// Check if the partition supports repairing // Check if the partition supports repairing
+1 -1
View File
@@ -59,7 +59,7 @@ private:
}; };
static int usage(char *prog) static int usage(const char *prog)
{ {
printf("usage: eject [-q|-l|-s|-b|-u] /dev/disk/.../raw\n"); printf("usage: eject [-q|-l|-s|-b|-u] /dev/disk/.../raw\n");
// printf("usage: eject [-q|-l|-s|-b|-u] [scsi|ide|/dev/disk/.../raw]\n"); // printf("usage: eject [-q|-l|-s|-b|-u] [scsi|ide|/dev/disk/.../raw]\n");
+3 -3
View File
@@ -134,7 +134,7 @@ errorToString(BString& output, status_t error, const char *appName = NULL)
} }
static int static void
errorOut(status_t error, const char *appName = NULL, bool showUsage = true) errorOut(status_t error, const char *appName = NULL, bool showUsage = true)
{ {
BString output; BString output;
@@ -304,9 +304,9 @@ main(int argc, char *argv[])
{ {
if (argc < 3) { if (argc < 3) {
if (argc < 2) if (argc < 2)
return errorOut(e_app_sys_switch); errorOut(e_app_sys_switch);
return errorOut(e_specify_version); errorOut(e_specify_version);
} }
// reset version infos // reset version infos