tst_QDir: fix -Wunused-result

We've been ignoring the result of symlink(2) and GCC 14 complained.

Fix by QCOMPARE()ing to 0, ie. verifying sucesss.

Amends 23d08ce2edab09562ad283dac5d46c09efec63ca.

Pick-to: 6.7 6.5 6.2 5.15
Change-Id: If58267e3883c77cd62aa72a42410c837b32d9c0b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit c880a3867a85c0efdc6773ad6b446a318198585a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2024-06-17 06:20:49 +02:00 committed by Qt Cherry-pick Bot
parent f3007e8624
commit 161996d1da

View File

@ -438,7 +438,7 @@ void tst_QDir::mkdirOnSymlink()
// create our structure:
dir.mkpath("two/three");
::symlink("two/three", "symlink");
QCOMPARE(::symlink("two/three", "symlink"), 0);
// try it:
QString path = "symlink/../four/five";