warning C6031 return value ignored in macro expansion
问题 I'm using following code to format HRESULT to message and write the message to file only if HRESULT is an error. The code compiles and works fine, except that I'm getting following compiler warning: Warning C6031 Return value ignored: 'wcsrchr'. I don't want to disable warning but to resolve it, but I'm not able to figure out how? Here is a minimum compilable code: // compile with: /Wall #include <Windows.h> #include <cwchar> // std::wcsrchr #include <comdef.h> // _com_error #include