widl [7/7]: Avoid warnings about unused parameters in write_union_tfs and sig handlers.

Dan Hipschman dsh at linux.ucla.edu
Wed Sep 13 18:36:18 CDT 2006


It looks like the write_union_tfs parameters will be used later, so rather
than remove them this quiets GCC for the time being.  For the signal
handlers, do the same thing.

ChangeLog:
* Use function parameters that are otherwise unused to avoid GCC warnings.
---
 tools/widl/typegen.c |    3 +++
 tools/widl/widl.c    |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c
index 3cc2f61..c18c72b 100644
--- a/tools/widl/typegen.c
+++ b/tools/widl/typegen.c
@@ -1267,6 +1267,9 @@ static size_t write_union_tfs(FILE *file
                               const type_t *type, const char *name,
                               unsigned int *typeformat_offset)
 {
+    /* Silence compiler warnings until this is implemented */
+    (void) file, (void) attrs, (void) type, (void) name;
+
     error("write_union_tfs: Unimplemented\n");
     return *typeformat_offset;
 }
diff --git a/tools/widl/widl.c b/tools/widl/widl.c
index c04d07f..43f9600 100644
--- a/tools/widl/widl.c
+++ b/tools/widl/widl.c
@@ -159,6 +159,7 @@ static char *dup_basename_token(const ch
 /* clean things up when aborting on a signal */
 static void exit_on_signal( int sig )
 {
+    (void) sig; /* Silence compiler warnings */
     exit(1);  /* this will call the atexit functions */
 }
 
@@ -432,6 +433,7 @@ static void rm_tempfile(void)
 
 static void segvhandler(int sig)
 {
+  (void) sig; /* Silence compiler warnings */
   fprintf(stderr, "\n%s:%d: Oops, segment violation\n", input_name, line_number);
   fflush(stdout);
   fflush(stderr);



More information about the wine-patches mailing list