shithub: sox

Download patch

ref: 632942f76110a55c987caaf43db9ccce1dca5aee
parent: b50a5fade32bea1e3dd8ef2768268e8095a2916e
author: Mans Rullgard <mans@mansr.com>
date: Wed Aug 12 07:07:47 EDT 2020

sndfile: drop unnecessary HAVE_SNDFILE tests

These files are only compiled if HAVE_SNDFILE is defined.  There is
no need to test it again within each file.

--- a/src/caf.c
+++ b/src/caf.c
@@ -17,8 +17,6 @@
 
 #include "sox_i.h"
 
-#if defined HAVE_SNDFILE
-
 LSX_FORMAT_HANDLER(caf)
 {
   static char const * const names[] = {"caf", NULL};
@@ -35,5 +33,3 @@
   handler.write_formats = write_encodings;
   return &handler;
 }
-
-#endif
--- a/src/fap.c
+++ b/src/fap.c
@@ -17,8 +17,6 @@
 
 #include "sox_i.h"
 
-#if defined HAVE_SNDFILE
-
 LSX_FORMAT_HANDLER(fap)
 {
   static char const * const names[] = {"fap", NULL};
@@ -31,5 +29,3 @@
   handler.write_formats = write_encodings;
   return &handler;
 }
-
-#endif
--- a/src/mat4.c
+++ b/src/mat4.c
@@ -17,8 +17,6 @@
 
 #include "sox_i.h"
 
-#if defined HAVE_SNDFILE
-
 LSX_FORMAT_HANDLER(mat4)
 {
   static char const * const names[] = {"mat4", "mat", NULL};
@@ -33,5 +31,3 @@
   handler.write_formats = write_encodings;
   return &handler;
 }
-
-#endif
--- a/src/mat5.c
+++ b/src/mat5.c
@@ -17,8 +17,6 @@
 
 #include "sox_i.h"
 
-#if defined HAVE_SNDFILE
-
 LSX_FORMAT_HANDLER(mat5)
 {
   static char const * const names[] = {"mat5", NULL};
@@ -33,5 +31,3 @@
   handler.write_formats = write_encodings;
   return &handler;
 }
-
-#endif
--- a/src/paf.c
+++ b/src/paf.c
@@ -17,8 +17,6 @@
 
 #include "sox_i.h"
 
-#if defined HAVE_SNDFILE
-
 LSX_FORMAT_HANDLER(paf)
 {
   static char const * const names[] = {"paf", NULL};
@@ -31,5 +29,3 @@
   handler.write_formats = write_encodings;
   return &handler;
 }
-
-#endif
--- a/src/pvf.c
+++ b/src/pvf.c
@@ -17,8 +17,6 @@
 
 #include "sox_i.h"
 
-#if defined HAVE_SNDFILE
-
 LSX_FORMAT_HANDLER(pvf)
 {
   static char const * const names[] = {"pvf", NULL};
@@ -30,5 +28,3 @@
   handler.write_formats = write_encodings;
   return &handler;
 }
-
-#endif
--- a/src/sd2.c
+++ b/src/sd2.c
@@ -17,8 +17,6 @@
 
 #include "sox_i.h"
 
-#if defined HAVE_SNDFILE
-
 LSX_FORMAT_HANDLER(sd2)
 {
   static char const * const names[] = {"sd2", NULL};
@@ -30,5 +28,3 @@
   handler.write_formats = write_encodings;
   return &handler;
 }
-
-#endif
--- a/src/sndfile.c
+++ b/src/sndfile.c
@@ -20,8 +20,6 @@
 
 #include "sox_i.h"
 
-#ifdef HAVE_SNDFILE
-
 #include <assert.h>
 #include <stdio.h>
 #include <string.h>
@@ -536,5 +534,3 @@
 
   return &format;
 }
-
-#endif
--- a/src/w64.c
+++ b/src/w64.c
@@ -17,8 +17,6 @@
 
 #include "sox_i.h"
 
-#if defined HAVE_SNDFILE
-
 LSX_FORMAT_HANDLER(w64)
 {
   static char const * const names[] = {"w64", NULL};
@@ -39,5 +37,3 @@
   handler.write_formats = write_encodings;
   return &handler;
 }
-
-#endif
--- a/src/xi.c
+++ b/src/xi.c
@@ -17,8 +17,6 @@
 
 #include "sox_i.h"
 
-#if defined HAVE_SNDFILE
-
 LSX_FORMAT_HANDLER(xi)
 {
   static char const * const names[] = {"xi", NULL};
@@ -30,5 +28,3 @@
   handler.write_formats = write_encodings;
   return &handler;
 }
-
-#endif