From 08c9d50a1c8185bceed9c33659524487a6c0f3b1 Mon Sep 17 00:00:00 2001 From: Milan Zamazal Date: Wed, 15 Jun 2022 19:50:24 +0200 Subject: [PATCH] Silence compilation warnings about unused variables --- pw-access.el | 10 +++++----- pw-lib.el | 6 +++--- pw-ui.el | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pw-access.el b/pw-access.el index 85510b3..1f028c2 100644 --- a/pw-access.el +++ b/pw-access.el @@ -123,7 +123,7 @@ Note this interface may not work with all PipeWire versions.") (push (cons id properties) objects))) (nreverse objects))) -(cl-defmethod pw-access-objects ((class pw-cli-accessor)) +(cl-defmethod pw-access-objects ((_class pw-cli-accessor)) (with-temp-buffer (pw-cli--command pw-cli-command '("list-objects")) (pw-cli--parse-list))) @@ -166,7 +166,7 @@ Note this interface may not work with all PipeWire versions.") (push (cons property value) properties)))) properties)) -(cl-defmethod pw-access-properties ((class pw-cli-accessor) node-id) +(cl-defmethod pw-access-properties ((_class pw-cli-accessor) node-id) (with-temp-buffer (pw-cli--command pw-cli-command `("enum-params" ,(number-to-string node-id) "Props")) (pw-cli--parse-properties))) @@ -183,11 +183,11 @@ Note this interface may not work with all PipeWire versions.") (defun pw-cli--format-property (property) (format "%s: %s" (car property) (pw-cli--format-property-value (cdr property)))) -(cl-defmethod pw-access-set-properties ((class pw-cli-accessor) node-id properties) (let* ((formatted (mapconcat #'pw-cli--format-property properties ", ")) (props (concat "{ " formatted " }"))) (call-process pw-cli-command nil pw-cli-command nil "set-param" (number-to-string node-id) "Props" props))) +(cl-defmethod pw-access-set-properties ((_class pw-cli-accessor) node-id properties) (defun pw-cli--parse-metadata () (let ((metadata '())) @@ -197,12 +197,12 @@ Note this interface may not work with all PipeWire versions.") (push (cons (match-string 1) (match-string 3)) metadata)) metadata)) -(cl-defmethod pw-access-defaults ((class pw-cli-accessor)) +(cl-defmethod pw-access-defaults ((_class pw-cli-accessor)) (with-temp-buffer (pw-cli--command pw-cli-metadata-command '("0")) (pw-cli--parse-metadata))) -(cl-defmethod pw-access-set-default ((class pw-cli-accessor) property node-name) +(cl-defmethod pw-access-set-default ((_class pw-cli-accessor) property node-name) (call-process pw-cli-metadata-command nil pw-cli-metadata-command nil "0" property (format "{ \"name\": \"%s\" }" node-name))) diff --git a/pw-lib.el b/pw-lib.el index 00d2866..ddbbc54 100644 --- a/pw-lib.el +++ b/pw-lib.el @@ -197,7 +197,7 @@ version, call `pw-lib-refresh' first." Applicable only to Nodes and Ports. If REFRESH is non-nil then retrive fresh information from PipeWire rather than using cached data to obtain the result." - (cl-destructuring-bind (node-p parameters monitor-p node-id port-id) + (cl-destructuring-bind (_node-p parameters monitor-p _node-id _port-id) (pw-lib--object-parameters object refresh) (eq (cdr (assoc (if monitor-p "monitorMute" "mute") parameters)) 'true))) @@ -207,7 +207,7 @@ Return the new boolean mute status of OBJECT. Applicable only to Nodes and Ports. If REFRESH is non-nil then retrive fresh information from PipeWire rather than using cached data to obtain the result." - (cl-destructuring-bind (node-p parameters monitor-p node-id port-id) + (cl-destructuring-bind (_node-p _parameters monitor-p node-id _port-id) (pw-lib--object-parameters object refresh) (let* ((mute (not (pw-lib-muted-p object))) (property (if monitor-p "monitorMute" "mute")) @@ -221,7 +221,7 @@ The returned value is an integer in the range 0-100. Applicable only to Nodes and Ports. If REFRESH is non-nil then retrive fresh information from PipeWire rather than using cached data to obtain the result." - (cl-destructuring-bind (node-p parameters monitor-p node-id port-id) + (cl-destructuring-bind (node-p parameters monitor-p _node-id port-id) (pw-lib--object-parameters object refresh) (pw-lib--volume-% (if node-p diff --git a/pw-ui.el b/pw-ui.el index a7e4504..09a27a2 100644 --- a/pw-ui.el +++ b/pw-ui.el @@ -129,7 +129,7 @@ The indicator is displayed only on graphical terminals." (defun pw-ui--insert-line (line object) (insert (propertize line 'pw-object-id (pw-lib-object-id object)) "\n")) -(defun pipewire-refresh (&optional ignore-auto noconfirm) +(defun pipewire-refresh (&optional _ignore-auto _noconfirm) "Refresh PipeWire buffer." (interactive) (when (and (not (eq major-mode 'pipewire-mode))