From fad3142a4743f8c07669c2c6107b6f99046f9cf8 Mon Sep 17 00:00:00 2001 From: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com> Date: Tue, 23 Jun 2020 17:47:17 -0700 Subject: [PATCH] Fix for warning: Error CA1806 BringProcessToForeground calls SendInput but does not use the HRESULT or error code that the method returns. This could lead to unexpected behavior in error conditions or low-resource situations. Use the result in a conditional statement, assign the result to a variable, or pass it as an argument to another method. PowerLauncher C:\Repos\PowerToys\src\modules\launcher\PowerLauncher\MainWindow.xaml.cs 73 Active --- src/modules/launcher/PowerLauncher/MainWindow.xaml.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs index dfecf918dc..eb538eac77 100644 --- a/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs +++ b/src/modules/launcher/PowerLauncher/MainWindow.xaml.cs @@ -70,7 +70,7 @@ namespace PowerLauncher WindowsInteropHelper.INPUT[] inputs = new WindowsInteropHelper.INPUT[] { input }; // Send empty mouse event. This makes this thread the last to send input, and hence allows it to pass foreground permission checks - WindowsInteropHelper.SendInput(1, inputs, WindowsInteropHelper.INPUT.Size); + _ = WindowsInteropHelper.SendInput(1, inputs, WindowsInteropHelper.INPUT.Size); Activate(); }