mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-13 11:19:50 +03:00
25 lines
799 B
Diff
25 lines
799 B
Diff
--- intel-graphics-compiler-igc-1.0.8744/visa/iga/IGALibrary/system.cpp 2021-09-16 11:50:38.000000000 +0300
|
|
+++ intel-graphics-compiler-igc-1.0.8744/visa/iga/IGALibrary/system.cpp 2021-10-03 14:59:08.779865094 +0300
|
|
@@ -246,9 +246,8 @@
|
|
{
|
|
std::string msg;
|
|
char buf[256] {0};
|
|
- char *errMsg = nullptr;
|
|
+ char *errMsg = &buf[0];
|
|
#ifdef _WIN32
|
|
- errMsg = &buf[0];
|
|
FormatMessageA(
|
|
FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
|
|
NULL,
|
|
@@ -260,9 +259,9 @@
|
|
if (errMsg)
|
|
msg = errMsg;
|
|
#else
|
|
- errMsg = strerror_r(errCode, buf, sizeof(buf));
|
|
+ strerror_r(errCode, buf, sizeof(buf));
|
|
#endif // _WIN32
|
|
- if (errMsg == nullptr || errMsg[0] == 0)
|
|
+ if (errMsg[0] == 0)
|
|
return "???";
|
|
return std::string(errMsg);
|
|
}
|