Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
dev
-
None
-
635774fc3 (dev), 6710ec26d (6.6), c81a9e4ed (tqtc/lts-6.5)
Description
GCC 13 in unity-builds sees this and complains:
qprocess_unix.cpp:1256:42: error: ‘info.forkfd_info::code’ may be used uninitialized [-Werror=maybe-uninitialized] 1256 | exitStatus = info.code == CLD_EXITED ? QProcess::NormalExit : QProcess::CrashExit; | ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ qprocess_unix.cpp:1251:17: note: ‘info.forkfd_info::code’ was declared here 1251 | forkfd_info info; | ^~~~ qprocess_unix.cpp:1255:14: error: ‘info.forkfd_info::status’ may be used uninitialized [-Werror=maybe-uninitialized] 1255 | exitCode = info.status; | ~~~~~~~~~^~~~~~~~~~~~~ qprocess_unix.cpp:1251:17: note: ‘info.forkfd_info::status’ was declared here 1251 | forkfd_info info; | ^~~~
Indeed, EINTR does not appear to be the only possible error code. I'd fix it myself, but I have no idea what we should set exitCode and exitStatus to if forkfd_wait fails.