shithub: libsamplerate

Download patch

ref: c8c0372feb8d61f7dd6888314d5b43b898df15a6
parent: 067263c46f29b8f510ae97204f6d3c26c23b9068
author: Erik de Castro Lopo <[email protected]>
date: Mon Aug 15 15:06:41 EDT 2011

Fix compiler warnings.

--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2011-08-15  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>
+
+    * configure.ac
+    Add symbol support for kfreebsd-*-gnu-*.
+
+    * configure.ac doc/Makefile.am
+    Improve installation of html docs.
+
+    * examples/audio_out.c tests/callback_hang_test.c
+    Fix compiler warnings.
+
 2011-02-22  Erik de Castro Lopo  <erikd AT mega-nerd DOT com>
 
     * tests/util.[ch]
--- a/examples/audio_out.c
+++ b/examples/audio_out.c
@@ -118,7 +118,7 @@
 {	LINUX_AUDIO_OUT *linux_out ;
 	static float float_buffer [BUFFER_LEN] ;
 	static short buffer [BUFFER_LEN] ;
-	int		k, readcount, ignored ;
+	int		k, readcount ;
 
 	if ((linux_out = (LINUX_AUDIO_OUT*) audio_out) == NULL)
 	{	printf ("linux_play : AUDIO_OUT is NULL.\n") ;
@@ -133,7 +133,7 @@
 	while ((readcount = callback (callback_data, float_buffer, BUFFER_LEN / linux_out->channels)))
 	{	for (k = 0 ; k < readcount * linux_out->channels ; k++)
 			buffer [k] = lrint (32767.0 * float_buffer [k]) ;
-		ignored = write (linux_out->fd, buffer, readcount * linux_out->channels * sizeof (short)) ;
+		(void) write (linux_out->fd, buffer, readcount * linux_out->channels * sizeof (short)) ;
 		} ;
 
 	return ;
--- a/tests/callback_hang_test.c
+++ b/tests/callback_hang_test.c
@@ -74,15 +74,11 @@
 	SRC_STATE	*src_state ;
 
 	double src_ratio = 1.0 ;
-	long out_count ;
-	int current_out ;
 	int k, error ;
 
 	printf ("\tcallback_hang_test  (%-28s) ....... ", src_get_name (converter)) ;
 	fflush (stdout) ;
 
-	current_out = 0 ;
-
 	/* Perform sample rate conversion. */
 	src_state = src_callback_new (input_callback, converter, 1, &error, NULL) ;
 	if (src_state == NULL)
@@ -93,7 +89,7 @@
 	for (k = 0 ; k < ARRAY_LEN (pairs) ; k++)
 	{	alarm (1) ;
 		src_ratio = pairs [k].ratio ;
-		out_count = src_callback_read (src_state, src_ratio, pairs [k].count, output) ;
+		src_callback_read (src_state, src_ratio, pairs [k].count, output) ;
 		} ;
 
 	src_state = src_delete (src_state) ;