Fix compiler warnings

This commit is contained in:
Michael Friedrich 2015-03-02 14:10:26 +01:00
parent faf6ce1a5f
commit dd5ca24210
3 changed files with 3 additions and 4 deletions

View File

@ -86,14 +86,14 @@ StreamReadStatus NetString::ReadStringFromStream(const Stream::Ptr& stream, Stri
char *data = context.Buffer + header_length + 1;
if (context.Size < header_length + 1 + len + 1) {
if (context.Size < header_length + 1 + data_length) {
context.MustRead = true;
return StatusNeedData;
}
if (data[len] != ',')
BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid NetString (missing ,)"));
*str = String(&data[0], &data[len]);
context.DropData(header_length + 1 + len + 1);

View File

@ -33,7 +33,7 @@ boost::mutex StreamLogger::m_Mutex;
* Constructor for the StreamLogger class.
*/
StreamLogger::StreamLogger(void)
: m_Stream(NULL), m_OwnsStream(false), m_Tty(false)
: m_Stream(NULL), m_OwnsStream(false)
{ }
void StreamLogger::Stop(void)

View File

@ -55,7 +55,6 @@ private:
static boost::mutex m_Mutex;
std::ostream *m_Stream;
bool m_OwnsStream;
bool m_Tty;
Timer::Ptr m_FlushLogTimer;