More compiler warning fixes using Martin Pool's UNUSED macro.
authorDavid Griffith <dave@661.org>
Sat, 11 Jun 2016 04:05:22 +0000 (21:05 -0700)
committerDavid Griffith <dave@661.org>
Sat, 11 Jun 2016 04:05:22 +0000 (21:05 -0700)
src/common/frotz.h
src/curses/ux_audio.c
src/curses/ux_init.c
src/curses/ux_input.c
src/curses/ux_screen.c
src/curses/ux_text.c
src/dumb/dumb_init.c
src/dumb/dumb_input.c
src/dumb/dumb_output.c

index de23895c771166bafe635f02a2ed88ca6a7f3b62..72aba0fbb420945a0a67272f4e382ae469bf6ca7 100644 (file)
@@ -90,6 +90,7 @@ typedef struct {
 
 
 #include "setup.h"
+#include "unused.h"
 
 /*** Constants that may be set at compile time ***/
 
index a9a1ac10f5819fbdd11b7236cdce5a2151f571b2..3e2f7e9258385bf3abb03b92b069a04b7bc6e391 100644 (file)
@@ -75,7 +75,7 @@ static void stereoize(float *, float *, size_t);
 
 static int mypower(int, int);
 static char *getfiledata(FILE *, long *);
-static void *mixer(void *);
+static void *mixer(void);
 
 static pthread_t       mixer_id;
 static pthread_t       playaiff_id;
@@ -135,7 +135,7 @@ void os_init_sound(void)
     pthread_attr_init(&attr);
     pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
 
-    err = pthread_create(&(mixer_id), &attr, &mixer, NULL);
+    err = pthread_create(&(mixer_id), &attr, (void *) &mixer, NULL);
     if (err != 0) {
        printf("Can't create mixer thread :[%s]", strerror(err));
        exit(1);
@@ -312,7 +312,7 @@ void os_wait_sample (void)
  * Data presented to the mixer must be floats at 44100hz
  *
  */
-static void *mixer(void *arg)
+static void *mixer(void)
 {
     short *shortbuffer;
     int default_driver;
@@ -321,8 +321,6 @@ static void *mixer(void *arg)
     int samplecount;
     int i;
 
-    arg = arg;         /* Keep -Wall quiet */
-
     ao_initialize();
     default_driver = ao_default_driver_id();
 
index 9d03cd49e3b1ab951d66efbf76a3e2e86d9b470c..4b28aad1b7bd599522e78f0589b1f759a5684ec9 100644 (file)
@@ -503,9 +503,8 @@ void os_reset_screen (void)
  *     RESTART_END - restart is complete
  *
  */
-void os_restart_game (int stage)
+void os_restart_game (int UNUSED (stage))
 {
-    stage = stage;     /* Keep -Wall quiet */
 }
 
 
@@ -923,7 +922,7 @@ static int geterrmode(char *value)
  * cleanly resize the window.
  *
  */
-void sigwinch_handler(int sig)
+void sigwinch_handler(int UNUSED(sig))
 {
 /*
 There are some significant problems involved in getting resizes to work
@@ -932,8 +931,6 @@ the Z-Machine standard itself.  See the file BUGS for a detailed
 explaination for this.  Because of this trouble, this function currently
 does nothing.
 */
-    sig = sig;         /* Keep -Wall quiet */
-
 }
 
 
index aaf3aef5f247775f47636a4f97f1d35c5454629d..97e0d014f193fd226d6693c20fc50bf16244d6b1 100644 (file)
@@ -613,13 +613,11 @@ zchar os_read_key (int timeout, int cursor)
  *
  */
 
-int os_read_file_name (char *file_name, const char *default_name, int flag)
+int os_read_file_name (char *file_name, const char *default_name, int UNUSED(flag))
 {
     int saved_replay = istream_replay;
     int saved_record = ostream_record;
 
-    flag = flag;       /*Keep -Wall quiet */
-
     /* Turn off playback and recording temporarily */
 
     istream_replay = 0;
index dfa4312ebe36b87e94753e1a4795dc0e12aa8016..4a8ef7f90b867624bd11de0e906fccf060d80746 100644 (file)
  * being erased.  This is not relevant for the curses interface.
  *
  */
-void os_erase_area (int top, int left, int bottom, int right, int win)
+void os_erase_area (int top, int left, int bottom, int right, int UNUSED(win))
 {
     int y, x, i, j;
 
-    win = win;         /* Keep -Wall quiet */
-
     /* Catch the most common situation and do things the easy way */
     if ((top == 1) && (bottom == h_screen_rows) &&
        (left == 1) && (right == h_screen_cols)) {
index 57d3b7512073f83c2f4e85df44003c97ff25717d..0384bbb11e43ec7cb7c1472764603ff76a9af27f 100644 (file)
@@ -185,11 +185,9 @@ void os_set_text_style (int new_style)
  * choose fonts which aren't supported by the interface.
  *
  */
-void os_set_font (int new_font)
+void os_set_font (int UNUSED(new_font))
 {
     /* Not implemented */
-    new_font = new_font;       /* Keep -Wall quiet */
-
 }/* os_set_font */
 
 
index 961613a77e6f8b1638b2e79847bff94ebfec5d43..a4617b565ee58f98053e20c1285872e568cc10d7 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #include "dumb_frotz.h"
-#include "../common/unused.h"
 
 f_setup_t f_setup;
 
index 701ec71be7f4417188a34394c78c5ca22903b7ef..bc64125364c3e4193ebecb78dcec013bafcbb32f 100644 (file)
@@ -5,7 +5,6 @@
  */
 
 #include "dumb_frotz.h"
-#include "../common/unused.h"
 
 f_setup_t f_setup;
 
index 31ec7273d6561a4385d2bcb6c411b8f4fed5d3e9..1e2bd39fb084bf4ff5fa4f4cee6adbc7abfd90b2 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #include "dumb_frotz.h"
-#include "../common/unused.h"
 
 f_setup_t f_setup;