shithub: riscv

Download patch

ref: 39c9f1abbb11b310e77f43fe4f5e580f1791be67
parent: bab59e5749eda4b39608913df59f7fa0934ed928
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Jul 12 22:56:51 EDT 2015

libFLAC: fix compiler warnings by properly declaring void function arguments

--- a/sys/src/cmd/audio/libFLAC/bitbuffer.c
+++ b/sys/src/cmd/audio/libFLAC/bitbuffer.c
@@ -267,7 +267,7 @@
  *
  ***********************************************************************/
 
-FLAC__BitBuffer *FLAC__bitbuffer_new()
+FLAC__BitBuffer *FLAC__bitbuffer_new(void)
 {
 	FLAC__BitBuffer *bb = (FLAC__BitBuffer*)calloc(1, sizeof(FLAC__BitBuffer));
 
--- a/sys/src/cmd/audio/libFLAC/file_decoder.c
+++ b/sys/src/cmd/audio/libFLAC/file_decoder.c
@@ -51,7 +51,7 @@
  ***********************************************************************/
 
 static void set_defaults_(FLAC__FileDecoder *decoder);
-static FILE *get_binary_stdin_();
+static FILE *get_binary_stdin_(void);
 static FLAC__SeekableStreamDecoderReadStatus read_callback_(const FLAC__SeekableStreamDecoder *decoder, FLAC__byte buffer[], unsigned *bytes, void *client_data);
 static FLAC__SeekableStreamDecoderSeekStatus seek_callback_(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 absolute_byte_offset, void *client_data);
 static FLAC__SeekableStreamDecoderTellStatus tell_callback_(const FLAC__SeekableStreamDecoder *decoder, FLAC__uint64 *absolute_byte_offset, void *client_data);
@@ -95,6 +95,8 @@
 	"FLAC__FILE_DECODER_UNINITIALIZED"
 };
 
+FLAC_API FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new(void);
+
 /***********************************************************************
  *
  * Class constructor/destructor
@@ -101,7 +103,7 @@
  *
  ***********************************************************************/
 
-FLAC_API FLAC__FileDecoder *FLAC__file_decoder_new()
+FLAC_API FLAC__FileDecoder *FLAC__file_decoder_new(void)
 {
 	FLAC__FileDecoder *decoder;
 
@@ -567,7 +569,7 @@
 /*
  * This will forcibly set stdin to binary mode (for OSes that require it)
  */
-FILE *get_binary_stdin_()
+FILE *get_binary_stdin_(void)
 {
 	/* if something breaks here it is probably due to the presence or
 	 * absence of an underscore before the identifiers 'setmode',
--- a/sys/src/cmd/audio/libFLAC/file_encoder.c
+++ b/sys/src/cmd/audio/libFLAC/file_encoder.c
@@ -91,6 +91,7 @@
 	"FLAC__FILE_ENCODER_UNINITIALIZED"
 };
 
+FLAC_API FLAC__SeekableStreamEncoder *FLAC__seekable_stream_encoder_new(void);
 
 /***********************************************************************
  *
--- a/sys/src/cmd/audio/libFLAC/metadata_iterators.c
+++ b/sys/src/cmd/audio/libFLAC/metadata_iterators.c
@@ -157,6 +157,8 @@
 	FLAC__StreamMetadata *object;
 } level0_client_data;
 
+FLAC_API FLAC__FileDecoder *FLAC__file_decoder_new(void);
+
 FLAC_API FLAC__bool FLAC__metadata_get_streaminfo(const char *filename, FLAC__StreamMetadata *streaminfo)
 {
 	level0_client_data cd;
@@ -339,7 +341,7 @@
 };
 
 
-FLAC_API FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new()
+FLAC_API FLAC__Metadata_SimpleIterator *FLAC__metadata_simple_iterator_new(void)
 {
 	FLAC__Metadata_SimpleIterator *iterator = (FLAC__Metadata_SimpleIterator*)calloc(1, sizeof(FLAC__Metadata_SimpleIterator));
 
@@ -846,7 +848,7 @@
 };
 
 
-static FLAC__Metadata_Node *node_new_()
+static FLAC__Metadata_Node *node_new_(void)
 {
 	return (FLAC__Metadata_Node*)calloc(1, sizeof(FLAC__Metadata_Node));
 }
--- a/sys/src/cmd/audio/libFLAC/metadata_object.c
+++ b/sys/src/cmd/audio/libFLAC/metadata_object.c
@@ -1085,7 +1085,7 @@
 	return ok? (int)matching : -1;
 }
 
-FLAC_API FLAC__StreamMetadata_CueSheet_Track *FLAC__metadata_object_cuesheet_track_new()
+FLAC_API FLAC__StreamMetadata_CueSheet_Track *FLAC__metadata_object_cuesheet_track_new(void)
 {
 	return (FLAC__StreamMetadata_CueSheet_Track*)calloc(1, sizeof(FLAC__StreamMetadata_CueSheet_Track));
 }
--- a/sys/src/cmd/audio/libFLAC/seekable_stream_decoder.c
+++ b/sys/src/cmd/audio/libFLAC/seekable_stream_decoder.c
@@ -134,7 +134,7 @@
  *
  ***********************************************************************/
 
-FLAC_API FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new()
+FLAC_API FLAC__SeekableStreamDecoder *FLAC__seekable_stream_decoder_new(void)
 {
 	FLAC__SeekableStreamDecoder *decoder;
 
--- a/sys/src/cmd/audio/libFLAC/seekable_stream_encoder.c
+++ b/sys/src/cmd/audio/libFLAC/seekable_stream_encoder.c
@@ -103,6 +103,7 @@
 	"FLAC__SEEKABLE_STREAM_ENCODER_TELL_STATUS_ERROR"
 };
 
+FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new(void);
 
 /***********************************************************************
  *
@@ -110,7 +111,7 @@
  *
  ***********************************************************************/
 
-FLAC_API FLAC__SeekableStreamEncoder *FLAC__seekable_stream_encoder_new()
+FLAC_API FLAC__SeekableStreamEncoder *FLAC__seekable_stream_encoder_new(void)
 {
 	FLAC__SeekableStreamEncoder *encoder;
 
--- a/sys/src/cmd/audio/libFLAC/stream_decoder.c
+++ b/sys/src/cmd/audio/libFLAC/stream_decoder.c
@@ -174,6 +174,8 @@
 	"FLAC__STREAM_DECODER_ERROR_STATUS_FRAME_CRC_MISMATCH"
 };
 
+FLAC__BitBuffer *FLAC__bitbuffer_new(void);
+
 /***********************************************************************
  *
  * Class constructor/destructor
--- a/sys/src/cmd/audio/libFLAC/stream_encoder.c
+++ b/sys/src/cmd/audio/libFLAC/stream_encoder.c
@@ -434,12 +434,14 @@
 	"FLAC__STREAM_ENCODER_WRITE_STATUS_FATAL_ERROR"
 };
 
+FLAC__BitBuffer *FLAC__bitbuffer_new(void);
+
 /***********************************************************************
  *
  * Class constructor/destructor
  *
  */
-FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new()
+FLAC_API FLAC__StreamEncoder *FLAC__stream_encoder_new(void)
 {
 	FLAC__StreamEncoder *encoder;
 	unsigned i;