1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-01-18 04:58:51 +02:00

Fix common/lock test failing with -Werror=unused-result.

Wrap ftruncate() in TEST_RESULT_INT() to prevent this error.
This commit is contained in:
Reid Thompson 2023-09-30 12:47:15 -04:00 committed by GitHub
parent eccd9eed19
commit af4621894a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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