tst_qfile: fix GCC 13.2.1 compiler warning [-Wenum-compare]
By using "wt" for all OS's; according to Thiago the 't' is ignored
everywhere except on Windows.
tests/auto/corelib/io/qfile/tst_qfile.cpp:2846:70: warning: comparison
between ‘enum QOperatingSystemVersionBase::OSType’ and ‘enum
QOperatingSystemVersion::OSType’ [-Wenum-compare]
2846 | const char *openMode = QOperatingSystemVersion::current().type() != QOperatingSystemVersion::Windows
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Amends 3446313c7a
Pick-to: 6.7 6.6 6.5 6.2
Change-Id: I310d7d6ce3833756ffdc47b000e052ef3afdfdef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
parent
dea548ef04
commit
d7340d5c31
|
|
@ -2843,9 +2843,8 @@ void tst_QFile::socketPair()
|
|||
|
||||
void tst_QFile::textFile()
|
||||
{
|
||||
const char *openMode = QOperatingSystemVersion::current().type() != QOperatingSystemVersion::Windows
|
||||
? "w" : "wt";
|
||||
StdioFileGuard fs(fopen("writeabletextfile", openMode));
|
||||
// The "t" is ignored everywhere except on Windows
|
||||
StdioFileGuard fs(fopen("writeabletextfile", "wt"));
|
||||
QVERIFY(fs);
|
||||
QFile f;
|
||||
QByteArray part1("This\nis\na\nfile\nwith\nnewlines\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue