From a86b516f9a941de911f5ffad97a1952a93dd1a71 Mon Sep 17 00:00:00 2001 From: Siyuan Miao Date: Thu, 11 Sep 2025 02:16:45 +0200 Subject: [PATCH] fix: jsonrpc.go:1142:21: Error return value is not checked (errcheck) --- jsonrpc.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jsonrpc.go b/jsonrpc.go index 7b2d0a25..4dd6a4a8 100644 --- a/jsonrpc.go +++ b/jsonrpc.go @@ -1139,7 +1139,10 @@ func rpcDoExecuteKeyboardMacro(ctx context.Context, macro []hidrpc.KeyboardMacro // Sleep completed normally case <-ctx.Done(): // make sure keyboard state is reset - rpcKeyboardReport(0, keyboardClearStateKeys) + _, err := rpcKeyboardReport(0, keyboardClearStateKeys) + if err != nil { + logger.Warn().Err(err).Msg("failed to reset keyboard state") + } gadget.UpdateKeysDown(0, keyboardClearStateKeys) logger.Debug().Int("step", i).Msg("Keyboard macro cancelled during sleep")