bin: Clang warning fixes.
* Functions that call exit() should return void * char* -> const char* * main returns int, not bool.
This commit is contained in:
+1
-1
@@ -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
@@ -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");
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user