shithub: sox

Download patch

ref: f3ff097ef71d8bbe6ef26269bb754e70ac36a512
parent: 92c826d1e48cf56bc940fcac7c0303d4291b8b11
author: idigdoug <idigdoug>
date: Thu Dec 24 02:54:50 EST 2009

Fix warnings in MinGW build.

--- a/src/formats.c
+++ b/src/formats.c
@@ -415,8 +415,8 @@
 
 static sox_format_t * open_read(
     char               const * path,
-    void                     * buffer,
-    size_t                     buffer_size,
+    void                     * buffer UNUSED,
+    size_t                     buffer_size UNUSED,
     sox_signalinfo_t   const * signal,
     sox_encodinginfo_t const * encoding,
     char               const * filetype)
@@ -804,9 +804,9 @@
 
 static sox_format_t * open_write(
     char               const * path,
-    void                     * buffer,
-    size_t                     buffer_size,
-    char                     * * buffer_ptr,
+    void                     * buffer UNUSED,
+    size_t                     buffer_size UNUSED,
+    char                     * * buffer_ptr UNUSED,
     size_t                   * buffer_size_ptr,
     sox_signalinfo_t   const * signal,
     sox_encodinginfo_t const * encoding,
--- a/src/sox.h
+++ b/src/sox.h
@@ -30,6 +30,11 @@
 #define UNUSED
 #define PRINTF
 #endif
+#ifdef _MSC_VER
+#define LSX_UNUSED_VAR(x) ((void)(x))
+#else
+#define LSX_UNUSED_VAR(x) ((void)0)
+#endif
 
 /* The following is the API version of libSoX.  It is not meant
  * to follow the version number of SoX but it has historically.
--- a/src/util.h
+++ b/src/util.h
@@ -32,12 +32,6 @@
 #endif
 
 #ifdef _MSC_VER
-#define LSX_UNUSED_VAR(x) ((void)(x))
-#else
-#define LSX_UNUSED_VAR(x) ((void)0)
-#endif
-
-#ifdef _MSC_VER
 
 #define __STDC__ 1
 #define O_BINARY _O_BINARY