diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-14 14:35:44 +0200 |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-08-14 14:35:44 +0200 |
commit | 05145be7e502d4330ced88d3e55207a99c0a841b (patch) | |
tree | 41a76a506b286cc1c0a6bbf317c89879be7a5079 /src/scripttools | |
parent | b770651f19741907cd415ea9ad6e087cb32cc948 (diff) |
Fixed coverity warnings
Some dead code removed
Some member not initialized missing
Diffstat (limited to 'src/scripttools')
-rw-r--r-- | src/scripttools/debugging/qscriptstdmessagehandler.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/scripttools/debugging/qscriptstdmessagehandler.cpp b/src/scripttools/debugging/qscriptstdmessagehandler.cpp index bed04ecadb..5fb2db906b 100644 --- a/src/scripttools/debugging/qscriptstdmessagehandler.cpp +++ b/src/scripttools/debugging/qscriptstdmessagehandler.cpp @@ -92,18 +92,7 @@ void QScriptStdMessageHandler::message(QtMsgType type, const QString &text, } msg.append(text); - FILE *fp = 0; - switch (type) { - case QtDebugMsg: - fp = stdout; - break; - case QtWarningMsg: - case QtCriticalMsg: - case QtFatalMsg: - fp = stderr; - break; - } - + FILE *fp = (type == QtDebugMsg) ? stdout : stderr; fprintf(fp, "%s\n", msg.toLatin1().constData()); fflush(fp); } |