From 1d24b5222099ea65ae837b95095452e6900a57c7 Mon Sep 17 00:00:00 2001
From: Marco Antognini <antognini.marco@gmail.com>
Date: Tue, 28 Oct 2014 18:48:10 +0100
Subject: [PATCH] Silenced some warnings

---
 include/SFML/Audio/OutputSoundFile.hpp |  2 +-
 src/SFML/Audio/SoundFileReaderFlac.cpp | 20 ++++++++++----------
 src/SFML/Audio/SoundFileReaderWav.cpp  |  2 +-
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/SFML/Audio/OutputSoundFile.hpp b/include/SFML/Audio/OutputSoundFile.hpp
index 4f25c66d..a1ee48f9 100644
--- a/include/SFML/Audio/OutputSoundFile.hpp
+++ b/include/SFML/Audio/OutputSoundFile.hpp
@@ -77,7 +77,7 @@ public :
     /// \brief Write audio samples to the file
     ///
     /// \param samples     Pointer to the sample array to write
-    /// \param sampleCount Number of samples to write
+    /// \param count       Number of samples to write
     ///
     ////////////////////////////////////////////////////////////
     void write(const Int16* samples, Uint64 count);
diff --git a/src/SFML/Audio/SoundFileReaderFlac.cpp b/src/SFML/Audio/SoundFileReaderFlac.cpp
index c4171146..41643d4c 100644
--- a/src/SFML/Audio/SoundFileReaderFlac.cpp
+++ b/src/SFML/Audio/SoundFileReaderFlac.cpp
@@ -33,7 +33,7 @@
 
 namespace
 {
-    FLAC__StreamDecoderReadStatus read(const FLAC__StreamDecoder*, FLAC__byte buffer[], std::size_t* bytes, void* clientData)
+    FLAC__StreamDecoderReadStatus streamRead(const FLAC__StreamDecoder*, FLAC__byte buffer[], std::size_t* bytes, void* clientData)
     {
         sf::priv::SoundFileReaderFlac::ClientData* data = static_cast<sf::priv::SoundFileReaderFlac::ClientData*>(clientData);
 
@@ -53,7 +53,7 @@ namespace
         }
     }
 
-    FLAC__StreamDecoderSeekStatus seek(const FLAC__StreamDecoder*, FLAC__uint64 absoluteByteOffset, void* clientData)
+    FLAC__StreamDecoderSeekStatus streamSeek(const FLAC__StreamDecoder*, FLAC__uint64 absoluteByteOffset, void* clientData)
     {
         sf::priv::SoundFileReaderFlac::ClientData* data = static_cast<sf::priv::SoundFileReaderFlac::ClientData*>(clientData);
 
@@ -64,7 +64,7 @@ namespace
             return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
     }
 
-    FLAC__StreamDecoderTellStatus tell(const FLAC__StreamDecoder*, FLAC__uint64* absoluteByteOffset, void* clientData)
+    FLAC__StreamDecoderTellStatus streamTell(const FLAC__StreamDecoder*, FLAC__uint64* absoluteByteOffset, void* clientData)
     {
         sf::priv::SoundFileReaderFlac::ClientData* data = static_cast<sf::priv::SoundFileReaderFlac::ClientData*>(clientData);
 
@@ -80,7 +80,7 @@ namespace
         }
     }
 
-    FLAC__StreamDecoderLengthStatus length(const FLAC__StreamDecoder*, FLAC__uint64* streamLength, void* clientData)
+    FLAC__StreamDecoderLengthStatus streamLength(const FLAC__StreamDecoder*, FLAC__uint64* streamLength, void* clientData)
     {
         sf::priv::SoundFileReaderFlac::ClientData* data = static_cast<sf::priv::SoundFileReaderFlac::ClientData*>(clientData);
 
@@ -96,14 +96,14 @@ namespace
         }
     }
 
-    FLAC__bool eof(const FLAC__StreamDecoder*, void* clientData)
+    FLAC__bool streamEof(const FLAC__StreamDecoder*, void* clientData)
     {
         sf::priv::SoundFileReaderFlac::ClientData* data = static_cast<sf::priv::SoundFileReaderFlac::ClientData*>(clientData);
 
         return data->stream->tell() == data->stream->getSize();
     }
 
-    FLAC__StreamDecoderWriteStatus write(const FLAC__StreamDecoder*, const FLAC__Frame* frame, const FLAC__int32* const buffer[], void* clientData)
+    FLAC__StreamDecoderWriteStatus streamWrite(const FLAC__StreamDecoder*, const FLAC__Frame* frame, const FLAC__int32* const buffer[], void* clientData)
     {
         sf::priv::SoundFileReaderFlac::ClientData* data = static_cast<sf::priv::SoundFileReaderFlac::ClientData*>(clientData);
 
@@ -159,7 +159,7 @@ namespace
         return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
     }
 
-    void metadata(const FLAC__StreamDecoder*, const FLAC__StreamMetadata* meta, void* clientData)
+    void streamMetadata(const FLAC__StreamDecoder*, const FLAC__StreamMetadata* meta, void* clientData)
     {
         sf::priv::SoundFileReaderFlac::ClientData* data = static_cast<sf::priv::SoundFileReaderFlac::ClientData*>(clientData);
 
@@ -171,7 +171,7 @@ namespace
         }
     }
 
-    void error(const FLAC__StreamDecoder*, FLAC__StreamDecoderErrorStatus status, void* clientData)
+    void streamError(const FLAC__StreamDecoder*, FLAC__StreamDecoderErrorStatus, void* clientData)
     {
         sf::priv::SoundFileReaderFlac::ClientData* data = static_cast<sf::priv::SoundFileReaderFlac::ClientData*>(clientData);
         data->error = true;
@@ -194,7 +194,7 @@ bool SoundFileReaderFlac::check(InputStream& stream)
     ClientData data;
     data.stream = &stream;
     data.error = false;
-    FLAC__stream_decoder_init_stream(decoder, &::read, &::seek, &::tell, &::length, &::eof, &::write, NULL, &::error, &data);
+    FLAC__stream_decoder_init_stream(decoder, &streamRead, &streamSeek, &streamTell, &streamLength, &streamEof, &streamWrite, NULL, &streamError, &data);
 
     // Read the header
     bool valid = FLAC__stream_decoder_process_until_end_of_metadata(decoder) != 0;
@@ -234,7 +234,7 @@ bool SoundFileReaderFlac::open(InputStream& stream, Info& info)
 
     // Initialize the decoder with our callbacks
     m_clientData.stream = &stream;
-    FLAC__stream_decoder_init_stream(m_decoder, &::read, &::seek, &::tell, &::length, &::eof, &::write, &::metadata, &::error, &m_clientData);
+    FLAC__stream_decoder_init_stream(m_decoder, &streamRead, &streamSeek, &streamTell, &streamLength, &streamEof, &streamWrite, &streamMetadata, &streamError, &m_clientData);
 
     // Read the header
     if (!FLAC__stream_decoder_process_until_end_of_metadata(m_decoder))
diff --git a/src/SFML/Audio/SoundFileReaderWav.cpp b/src/SFML/Audio/SoundFileReaderWav.cpp
index b80134d9..a778f41e 100644
--- a/src/SFML/Audio/SoundFileReaderWav.cpp
+++ b/src/SFML/Audio/SoundFileReaderWav.cpp
@@ -87,7 +87,7 @@ namespace priv
 bool SoundFileReaderWav::check(InputStream& stream)
 {
     char header[mainChunkSize];
-    if (stream.read(header, sizeof(header)) < sizeof(header))
+    if (stream.read(header, sizeof(header)) < static_cast<Int64>(sizeof(header)))
         return false;
 
     return (header[0] == 'R') && (header[1] == 'I') && (header[2] == 'F') && (header[3] == 'F')