Make warnings quiet by default and added -w option.
diff --git a/tools/winebuild/build.h b/tools/winebuild/build.h
index 295ba6c..adcb6f4 100644
--- a/tools/winebuild/build.h
+++ b/tools/winebuild/build.h
@@ -238,6 +238,7 @@
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];
diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c
index a44e691..df64de8 100644
--- a/tools/winebuild/main.c
+++ b/tools/winebuild/main.c
@@ -45,6 +45,7 @@
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 @@
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 @@
{
{ "-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 @@
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();
diff --git a/tools/winebuild/utils.c b/tools/winebuild/utils.c
index 4a3e0cc..5f8cfa6 100644
--- a/tools/winebuild/utils.c
+++ b/tools/winebuild/utils.c
@@ -106,6 +106,8 @@
void warning( const char *msg, ... )
{
va_list valist;
+
+ if (!display_warnings) return;
va_start( valist, msg );
if (input_file_name)
{