Description: Backport upstream fix for FTBFS with gcc 12
Author: Adrian Bunk <bunk@debian.org>
Bug-Debian: https://bugs.debian.org/1013043
Forwarded: https://github.com/stressapptest/stressapptest/commit/2ea87b7996f4f433d5d946eaf8f0d2f6fd18c144

--- stressapptest-1.0.6.orig/src/worker.cc
+++ stressapptest-1.0.6/src/worker.cc
@@ -2989,8 +2989,9 @@ bool DiskThread::AsyncDiskIO(IoOp op, in
     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",
