summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorErik de Castro Lopo <erikd@mega-nerd.com>2013-03-05 22:19:27 +1100
committerErik de Castro Lopo <erikd@mega-nerd.com>2013-03-06 07:42:08 +1100
commit91790ef965553fd6d76e1f51b55dc4de3b54ad4b (patch)
treed861175885072946cc2662c7a3a10f6d877c593d /include
parent05609d5b4b02e87c17c01a0ebb9fc2e05b799d90 (diff)
downloadflac-91790ef965553fd6d76e1f51b55dc4de3b54ad4b.tar.gz
Fix compiler warnings from new compiler flags.
Diffstat (limited to 'include')
-rw-r--r--include/share/Makefile.am1
-rw-r--r--include/share/macros.h41
2 files changed, 42 insertions, 0 deletions
diff --git a/include/share/Makefile.am b/include/share/Makefile.am
index a881e778..fd8b947c 100644
--- a/include/share/Makefile.am
+++ b/include/share/Makefile.am
@@ -8,6 +8,7 @@ EXTRA_DIST = \
endswap.h \
getopt.h \
grabbag.h \
+ macros.h \
replaygain_analysis.h \
replaygain_synthesis.h \
utf8.h
diff --git a/include/share/macros.h b/include/share/macros.h
new file mode 100644
index 00000000..5be07a16
--- /dev/null
+++ b/include/share/macros.h
@@ -0,0 +1,41 @@
+/* libFLAC - Free Lossless Audio Codec library
+ * Copyright (C) 2013 Xiph.org Foundation
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * - Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * - Neither the name of the Xiph.org Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <errno.h>
+
+/* FLAC_CHECK_RETURN : Check the return value of of the provided function and
+ * print and error message if it fails (ie returns a value < 0).
+ */
+
+#define FLAC_CHECK_RETURN(x) \
+ { if ((x) < 0) \
+ printf ("%s : %s\n", #x, strerror (errno)) ; \
+ }