mirror of https://github.com/Icinga/icinga2.git
Fix compiler warnings
This commit is contained in:
parent
faf6ce1a5f
commit
dd5ca24210
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -55,7 +55,6 @@ private:
|
|||
static boost::mutex m_Mutex;
|
||||
std::ostream *m_Stream;
|
||||
bool m_OwnsStream;
|
||||
bool m_Tty;
|
||||
|
||||
Timer::Ptr m_FlushLogTimer;
|
||||
|
||||
|
|
Loading…
Reference in New Issue