Commit 19c0b3ee authored by Alexandre Julliard's avatar Alexandre Julliard

winedump: Use consistent prototypes for option callbacks.

parent 328b1d9d
...@@ -80,13 +80,13 @@ static void do_dump (const char *arg) ...@@ -80,13 +80,13 @@ static void do_dump (const char *arg)
} }
static void do_code (void) static void do_code (const char *arg)
{ {
globals.do_code = 1; globals.do_code = 1;
} }
static void do_trace (void) static void do_trace (const char *arg)
{ {
globals.do_trace = 1; globals.do_trace = 1;
globals.do_code = 1; globals.do_code = 1;
...@@ -100,18 +100,18 @@ static void do_forward (const char *arg) ...@@ -100,18 +100,18 @@ static void do_forward (const char *arg)
globals.do_code = 1; globals.do_code = 1;
} }
static void do_document (void) static void do_document (const char *arg)
{ {
globals.do_documentation = 1; globals.do_documentation = 1;
} }
static void do_cdecl (void) static void do_cdecl (const char *arg)
{ {
globals.do_cdecl = 1; globals.do_cdecl = 1;
} }
static void do_quiet (void) static void do_quiet (const char *arg)
{ {
globals.do_quiet = 1; globals.do_quiet = 1;
} }
...@@ -157,18 +157,18 @@ static void do_symfile (const char *arg) ...@@ -157,18 +157,18 @@ static void do_symfile (const char *arg)
} }
static void do_verbose (void) static void do_verbose (const char *arg)
{ {
globals.do_verbose = 1; globals.do_verbose = 1;
} }
static void do_symdmngl (void) static void do_symdmngl (const char *arg)
{ {
globals.do_demangle = 1; globals.do_demangle = 1;
} }
static void do_dumphead (void) static void do_dumphead (const char *arg)
{ {
globals.do_dumpheader = 1; globals.do_dumpheader = 1;
} }
...@@ -178,12 +178,12 @@ static void do_dumpsect (const char* arg) ...@@ -178,12 +178,12 @@ static void do_dumpsect (const char* arg)
globals.dumpsect = arg; globals.dumpsect = arg;
} }
static void do_rawdebug (void) static void do_rawdebug (const char *arg)
{ {
globals.do_debug = 1; globals.do_debug = 1;
} }
static void do_dumpall(void) static void do_dumpall(const char *arg)
{ {
globals.do_dumpheader = 1; globals.do_dumpheader = 1;
globals.do_dump_rawdata = 1; globals.do_dump_rawdata = 1;
...@@ -195,7 +195,7 @@ struct my_option ...@@ -195,7 +195,7 @@ struct my_option
const char *name; const char *name;
Mode mode; Mode mode;
int has_arg; int has_arg;
void (*func) (); void (*func)(const char *arg);
const char *usage; const char *usage;
}; };
...@@ -226,7 +226,7 @@ static const struct my_option option_table[] = { ...@@ -226,7 +226,7 @@ static const struct my_option option_table[] = {
{NULL, NONE, 0, NULL, NULL} {NULL, NONE, 0, NULL, NULL}
}; };
void do_usage (void) void do_usage (const char *arg)
{ {
const struct my_option *opt; const struct my_option *opt;
printf ("Usage: winedump [-h | sym <sym> | spec <dll> | dump <file>]\n"); printf ("Usage: winedump [-h | sym <sym> | spec <dll> | dump <file>]\n");
...@@ -466,7 +466,7 @@ int main (int argc, char *argv[]) ...@@ -466,7 +466,7 @@ int main (int argc, char *argv[])
return 1; return 1;
break; break;
case NONE: case NONE:
do_usage(); do_usage(0);
break; break;
case DUMP: case DUMP:
if (globals.input_name == NULL) if (globals.input_name == NULL)
......
...@@ -268,10 +268,10 @@ void dump_frame_pointer_omission(unsigned long base, unsigned long len); ...@@ -268,10 +268,10 @@ void dump_frame_pointer_omission(unsigned long base, unsigned long len);
FILE *open_file (const char *name, const char *ext, const char *mode); FILE *open_file (const char *name, const char *ext, const char *mode);
#ifdef __GNUC__ #ifdef __GNUC__
void do_usage (void) __attribute__ ((noreturn)); void do_usage (const char *arg) __attribute__ ((noreturn));
void fatal (const char *message) __attribute__ ((noreturn)); void fatal (const char *message) __attribute__ ((noreturn));
#else #else
void do_usage (void); void do_usage (const char *arg);
void fatal (const char *message); void fatal (const char *message);
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment