Dead assignment in WpfGfx handle_errors_and_transform_hresult
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
* .NET Core Version: N/A
* Windows version: N/A
* Does the bug reproduce also in WPF for .NET Framework 4.8?: No
* Is this bug related specifically to tooling in Visual Studio (e.g. XAML Designer, Code editing, etc...)? No
* Security issues and bugs should be reported privately, learn more via our [responsible disclosure guidelines](https://github.com/dotnet/wpf/blob/master/README.md#reporting-security-issues-and-security-bugs).
**Problem description:**
The assignment to retval in handle_errors_and_transform_hresult, defined in shader_compiler_dx9.hpp and shader_compiler_xm.hpp, is unused. As a result, this function returns the error code passed to it in all cases, instead of changing some codes to WGXERR_SHADER_COMPILE_FAILED, as intended.
The correct solution is probably to return retval as intended, but I don't know if this will have any unintended consequences.
**Actual behavior:**
Compilation with mingw warns of an unused assignment to retval.
**Expected behavior:**
No compiler warnings.
**Minimal repro:**
I'm attempting to compile with mingw and a lot of changes were required to get this far. As such, I do not have a small way to test this.
Contributor guide
Assessment
This issue has not been assessed yet.