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>
bb10
Tasuku Suzuki 2013-10-07 10:45:26 +09:00 committed by The Qt Project
parent 52c8d9ffba
commit a3a1bd755f
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}