compiler warnings

This commit is contained in:
john30
2016-12-10 10:29:46 +01:00
parent b4a596da5a
commit b3e8d16e19
4 changed files with 6 additions and 7 deletions
-1
View File
@@ -67,7 +67,6 @@ void RotateFile::write(unsigned char* value, unsigned int size, bool received)
struct tm* tm;
clockGettime(&ts);
tm = localtime(&ts.tv_sec);
char* buf;
fprintf(m_stream, "%04d-%02d-%02d %02d:%02d:%02d.%03ld %c",
tm->tm_year+1900, tm->tm_mon+1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec, ts.tv_nsec/1000000,
+2 -2
View File
@@ -41,7 +41,7 @@ public:
* @param maxSize the maximum size of the file to write to.
* @param textMode whether to write each byte with prefixed timestamp and direction as text.
*/
RotateFile(const string fileName, const long maxSize, const bool textMode=false)
RotateFile(const string fileName, const unsigned long maxSize, const bool textMode=false)
: m_enabled(false), m_fileName(fileName), m_maxSize(maxSize), m_textMode(textMode), m_stream(), m_fileSize(0) {}
/**
@@ -78,7 +78,7 @@ private:
const string m_fileName;
/** the maximum size of @a m_file, or 0 for infinite. */
const long m_maxSize;
const unsigned long m_maxSize;
/** whether to write each byte with prefixed timestamp and direction as text. */
const bool m_textMode;