shithub: sox

Download patch

ref: f06e6548b588f7af272479600ed519ba3f4da155
parent: f88f10a371df2080d5dc0b9be60563791ac01aca
author: Mans Rullgard <mans@mansr.com>
date: Thu Feb 16 11:33:51 EST 2017

Get rid of warning suppression hack

Whatever warnings this used to silence, they are no longer triggered.
Drop the horrible hack.

--- a/msvc10/LibSoX.vcxproj
+++ b/msvc10/LibSoX.vcxproj
@@ -111,7 +111,6 @@
     <ClInclude Include="..\src\formats.h" />
     <ClInclude Include="..\src\g711.h" />
     <ClInclude Include="..\src\g72x.h" />
-    <ClInclude Include="..\src\ignore-warning.h" />
     <ClInclude Include="..\src\ima_rw.h" />
     <ClInclude Include="..\src\mcompand_xover.h" />
     <ClInclude Include="..\src\mp3-util.h" />
--- a/msvc10/LibSoX.vcxproj.filters
+++ b/msvc10/LibSoX.vcxproj.filters
@@ -73,9 +73,6 @@
     <ClInclude Include="..\src\g72x.h">
       <Filter>Headers</Filter>
     </ClInclude>
-    <ClInclude Include="..\src\ignore-warning.h">
-      <Filter>Headers</Filter>
-    </ClInclude>
     <ClInclude Include="..\src\ima_rw.h">
       <Filter>Headers</Filter>
     </ClInclude>
--- a/msvc9/LibSoX.vcproj
+++ b/msvc9/LibSoX.vcproj
@@ -234,10 +234,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\src\ignore-warning.h"
-				>
-			</File>
-			<File
 				RelativePath="..\src\ima_rw.h"
 				>
 			</File>
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -78,8 +78,7 @@
 	rate_filters.h rate_half_fir.h rate_poly_fir0.h rate_poly_fir.h \
 	remix.c repeat.c reverb.c reverse.c silence.c sinc.c skeleff.c \
 	speed.c splice.c stat.c stats.c stretch.c swap.c \
-	synth.c tempo.c tremolo.c trim.c upsample.c vad.c vol.c \
-	ignore-warning.h
+	synth.c tempo.c tremolo.c trim.c upsample.c vad.c vol.c
 if HAVE_PNG
     libsox_la_SOURCES += spectrogram.c
 endif
--- a/src/amr.h
+++ b/src/amr.h
@@ -258,9 +258,7 @@
   if (open_library_result != SOX_SUCCESS)
     return open_library_result;
 
-#define IGNORE_WARNING \
   p->state = AMR_CALL_ENCODER(p, AmrOpencoreEncoderInit, AmrGp3EncoderInit, ());
-#include "ignore-warning.h"
   if (!p->state)
   {
       closelibrary(p);
@@ -280,9 +278,7 @@
 {
   priv_t * p = (priv_t *)ft->priv;
   uint8_t coded[AMR_CODED_MAX];
-#define IGNORE_WARNING \
   int n = AMR_CALL_ENCODER(p, AmrOpencoreEncoderEncode, AmrGp3EncoderEncode, (p->state, p->mode, p->pcm, coded, 1));
-#include "ignore-warning.h"
   sox_bool result = lsx_writebuf(ft, coded, (size_t) (size_t) (unsigned)n) == (unsigned)n;
   if (!result)
     lsx_fail_errno(ft, errno, "write error");
--- a/src/ignore-warning.h
+++ /dev/null
@@ -1,32 +1,0 @@
-/* This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or (at
- * your option) any later version.
- *
- * This library is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser
- * General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this library; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
- */
-
-#if defined __GNUC__
-  #pragma GCC system_header
-#elif defined __SUNPRO_CC
-  #pragma disable_warn
-#elif defined _MSC_VER
-  #pragma warning(push, 1)
-#endif
-
-  IGNORE_WARNING
-#undef IGNORE_WARNING
-
-
-#if defined __SUNPRO_CC
-  #pragma enable_warn
-#elif defined _MSC_VER
-  #pragma warning(pop)
-#endif
--- a/src/vorbis.c
+++ b/src/vorbis.c
@@ -316,9 +316,8 @@
     }
     quality = ft->encoding.compression;
   }
-#define IGNORE_WARNING \
+
   if (vorbis_encode_init_vbr(&ve->vi, ft->signal.channels, ft->signal.rate + .5, quality / 10))
-#include "ignore-warning.h"
   {
     lsx_fail_errno(ft, SOX_EFMT, "libVorbis cannot encode this sample-rate or # of channels");
     return SOX_EOF;