diff options
author | Adrian Bunk <bunk@debian.org> | 2023-08-24 14:42:39 +0200 |
---|---|---|
committer | Emanuele Rocca <ema@debian.org> | 2023-08-24 14:42:39 +0200 |
commit | 7c480b3eb127c4974507ec566aa72a244321ac52 (patch) | |
tree | a376f28243121d70aa8e60e111da3768c8576e2d | |
parent | 545e15c4c6c3f5a0d96bc78cb19b57daf99cc7a5 (diff) |
Backport upstream fix for FTBFS with gcc 12
Bug-Debian: https://bugs.debian.org/1013043
Forwarded: https://github.com/stressapptest/stressapptest/commit/2ea87b7996f4f433d5d946eaf8f0d2f6fd18c144
Gbp-Pq: Name gcc-12
-rw-r--r-- | src/worker.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/worker.cc b/src/worker.cc index d24b5cd..ed6a374 100644 --- a/src/worker.cc +++ b/src/worker.cc @@ -2989,8 +2989,9 @@ bool DiskThread::AsyncDiskIO(IoOp op, int fd, void *buf, int64 size, errorcount_++; os_->ErrorReport(device_name_.c_str(), operations[op].error_str, 1); - if (event.res < 0) { - switch (event.res) { + int64 result = static_cast<int64>(event.res); + if (result < 0) { + switch (result) { case -EIO: logprintf(0, "Hardware Error: Low-level I/O error while doing %s to " "sectors starting at %lld on disk %s (thread %d).\n", |