compiler warnings
This commit is contained in:
parent
abb0243c87
commit
ce8aa3ba41
|
|
@ -125,7 +125,7 @@ protected:
|
||||||
// Primitive to print output on the console.
|
// Primitive to print output on the console.
|
||||||
// Return the number of characters written.
|
// Return the number of characters written.
|
||||||
virtual size_t printConsole(const char *buffer,
|
virtual size_t printConsole(const char *buffer,
|
||||||
size_t length) = 0;
|
size_t length);
|
||||||
void printToBuffer(const char *fmt,
|
void printToBuffer(const char *fmt,
|
||||||
...)
|
...)
|
||||||
__attribute__((format (printf, 2, 3)));
|
__attribute__((format (printf, 2, 3)));
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ Debug::reportLine(const char *what,
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
report_->printToBuffer(what);
|
report_->printToBuffer("%s", what);
|
||||||
report_->printToBufferAppend(": ");
|
report_->printToBufferAppend(": ");
|
||||||
report_->printToBufferAppend(fmt, args);
|
report_->printToBufferAppend(fmt, args);
|
||||||
report_->printBufferLine();
|
report_->printBufferLine();
|
||||||
|
|
|
||||||
|
|
@ -44,6 +44,14 @@ Report::~Report()
|
||||||
delete [] buffer_;
|
delete [] buffer_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t
|
||||||
|
Report::printConsole(const char *buffer,
|
||||||
|
size_t length)
|
||||||
|
{
|
||||||
|
printf("%s", buffer);
|
||||||
|
return length;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Report::printLine(const char *line,
|
Report::printLine(const char *line,
|
||||||
size_t length)
|
size_t length)
|
||||||
|
|
@ -276,7 +284,7 @@ Report::fileCritical(int /* id */,
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
printToBuffer("Critical: %s line %d, ", filename, line, fmt, args);
|
printToBuffer("Critical: %s line %d, ", filename, line);
|
||||||
printToBufferAppend(fmt, args);
|
printToBufferAppend(fmt, args);
|
||||||
printBufferLine();
|
printBufferLine();
|
||||||
va_end(args);
|
va_end(args);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue