From af4621894a20ca0333726d459e2e6409bd4ee1e0 Mon Sep 17 00:00:00 2001 From: Reid Thompson <1116827+jreidthompson@users.noreply.github.com> Date: Sat, 30 Sep 2023 12:47:15 -0400 Subject: [PATCH] Fix common/lock test failing with -Werror=unused-result. Wrap ftruncate() in TEST_RESULT_INT() to prevent this error. --- test/src/module/common/lockTest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/src/module/common/lockTest.c b/test/src/module/common/lockTest.c index cd042b15c..6ba613289 100644 --- a/test/src/module/common/lockTest.c +++ b/test/src/module/common/lockTest.c @@ -303,7 +303,7 @@ testRun(void) lseek(lockLocal.file[lockTypeBackup].fd, 0, SEEK_SET) == -1, FileOpenError, STORAGE_ERROR_READ_SEEK, (uint64_t)0, strZ(lockLocal.file[lockTypeBackup].name)); - ftruncate(lockLocal.file[lockTypeBackup].fd, 0); + TEST_RESULT_INT(ftruncate(lockLocal.file[lockTypeBackup].fd, 0), 0, "truncate lockLocal.file[lockTypeBackup].fd"); IoWrite *const write = ioFdWriteNewOpen(lockLocal.file[lockTypeBackup].name, lockLocal.file[lockTypeBackup].fd, 0);