summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTasuku Suzuki <stasuku@gmail.com>2013-10-07 10:45:26 +0900
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-15 17:53:32 +0200
commita3a1bd755fc69278f7fcdc7127aaf2a48e1a4980 (patch)
tree6cb83252fdd0c8273f01c6b4325ad1730b2520fe /src
parent52c8d9ffbabc05c8f6cd7d2a21c109afb6aae8d1 (diff)
Fix build when fwrite() is declared with attribute warn_unused_result
Task-number: QTBUG-33921 Change-Id: I58dded1f54239e4c5cfd5f4f5c1655dbf879b2c8 Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/tools/moc/generator.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp
index 34d3c06e97..b39a3b5e9f 100644
--- a/src/tools/moc/generator.cpp
+++ b/src/tools/moc/generator.cpp
@@ -310,7 +310,7 @@ void Generator::generateCode()
int escapeLen = lengthOfEscapeSequence(s, backSlashPos);
spanLen = qBound(spanLen, backSlashPos + escapeLen - idx, s.length() - idx);
}
- fwrite(s.constData() + idx, 1, spanLen, out);
+ fprintf(out, "%.*s", spanLen, s.constData() + idx);
idx += spanLen;
col += spanLen;
}