ref: bb56888a97ad1ab8facfd915c095fb5ba79a0b0d
parent: f1a111af2d9ca22703221123ba22e5f2cc948501
author: robs <robs>
date: Sun Feb 17 05:23:16 EST 2008
fix warnings
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -3,7 +3,7 @@
include_directories(${CMAKE_CURRENT_BINARY_DIR})
if(CMAKE_COMPILER_IS_GNUCC)
- add_definitions(-Wconversion)
+ add_definitions(-Wconversion -Werror)
endif(CMAKE_COMPILER_IS_GNUCC)
if (NOT EXTERNAL_GSM)
--- a/src/getopt.c
+++ b/src/getopt.c
@@ -513,13 +513,21 @@
long-named options. */
int
-_getopt_internal (argc, argv, optstring, longopts, longind, long_only)
- int argc;
- char *const *argv;
- const char *optstring;
- const struct option *longopts;
- int *longind;
- int long_only;
+_getopt_internal (
+ int argc,
+ char *const *argv,
+ const char *optstring,
+ const struct option *longopts,
+ int *longind,
+ int long_only);
+int
+_getopt_internal (
+ int argc,
+ char *const *argv,
+ const char *optstring,
+ const struct option *longopts,
+ int *longind,
+ int long_only)
{
int print_errors = opterr;
if (optstring[0] == ':')
--- a/src/getopt.h
+++ b/src/getopt.h
@@ -1,3 +1,11 @@
+#if defined __GNUC__
+ #pragma GCC system_header
+#elif defined __SUNPRO_CC
+ #pragma disable_warn
+#elif defined _MSC_VER
+ #pragma warning(push, 1)
+#endif
+
/* Declarations for getopt.
Copyright (C) 1989-1994, 1996-1999, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -179,3 +187,9 @@
#undef __need_getopt
#endif /* getopt.h */
+
+#if defined __SUNPRO_CC
+ #pragma enable_warn
+#elif defined _MSC_VER
+ #pragma warning(pop)
+#endif
--- a/src/getopt1.c
+++ b/src/getopt1.c
@@ -70,12 +70,19 @@
#endif
int
-getopt_long (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
+getopt_long (
+ int argc,
+ char *const *argv,
+ const char *options,
+ const struct option *long_options,
+ int *opt_index);
+int
+getopt_long (
+ int argc,
+ char *const *argv,
+ const char *options,
+ const struct option *long_options,
+ int *opt_index)
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
}
@@ -86,12 +93,19 @@
instead. */
int
-getopt_long_only (argc, argv, options, long_options, opt_index)
- int argc;
- char *const *argv;
- const char *options;
- const struct option *long_options;
- int *opt_index;
+getopt_long_only (
+ int argc,
+ char *const *argv,
+ const char *options,
+ const struct option *long_options,
+ int *opt_index);
+int
+getopt_long_only (
+ int argc,
+ char *const *argv,
+ const char *options,
+ const struct option *long_options,
+ int *opt_index)
{
return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
}
--- a/src/tests.sh
+++ b/src/tests.sh
@@ -208,6 +208,7 @@
fi
do_singlechannel_formats
+if false; then # needs skip & dir work for general use
${srcdir}/test-comments
if [ $? -eq 0 ]; then
echo "ok comments"
@@ -214,6 +215,7 @@
else
echo "*FAIL* comments"
exit 1
+fi
fi
${bindir}/sox -c 1 -r 44100 -n output.u1 synth .01 vol .5