Make warnings quiet by default and added -w option.

oldstable
Alexandre Julliard 2002-03-21 01:38:53 +00:00
parent 9b0ba7ca2b
commit 1cefed8122
3 changed files with 11 additions and 0 deletions

View File

@ -238,6 +238,7 @@ extern int debugging;
extern int stack_size;
extern int nb_debug_channels;
extern int nb_lib_paths;
extern int display_warnings;
extern char DLLName[80];
extern char DLLFileName[80];

View File

@ -45,6 +45,7 @@ int nb_entry_points = 0;
int nb_names = 0;
int nb_debug_channels = 0;
int nb_lib_paths = 0;
int display_warnings = 0;
/* we only support relay debugging on i386 */
#if defined(__i386__) && !defined(NO_TRACE_MSGS)
@ -110,6 +111,7 @@ struct option_descr
static void do_pic(void);
static void do_output( const char *arg );
static void do_usage(void);
static void do_warnings(void);
static void do_spec( const char *arg );
static void do_def( const char *arg );
static void do_glue( const char *arg );
@ -122,6 +124,7 @@ static const struct option_descr option_table[] =
{
{ "-fPIC", 0, do_pic, "-fPIC Generate PIC code" },
{ "-h", 0, do_usage, "-h Display this help message" },
{ "-w", 0, do_warnings,"-w Turn on warnings" },
{ "-L", 1, do_lib, "-L directory Look for imports libraries in 'directory'" },
{ "-o", 1, do_output, "-o name Set the output file name (default: stdout)" },
{ "-sym", 1, do_sym, "-sym file.o Read the list of undefined symbols from 'file.o'" },
@ -164,6 +167,11 @@ static void do_usage(void)
exit(1);
}
static void do_warnings(void)
{
display_warnings = 1;
}
static void do_spec( const char *arg )
{
if (exec_mode != MODE_NONE || !arg[0]) do_usage();

View File

@ -106,6 +106,8 @@ void fatal_perror( const char *msg, ... )
void warning( const char *msg, ... )
{
va_list valist;
if (!display_warnings) return;
va_start( valist, msg );
if (input_file_name)
{