Linux Sound subsystem development
 help / color / mirror / Atom feed
From: Cezary Rojewski <cezary.rojewski@intel.com>
To: tiwai@suse.com
Cc: linux-sound@vger.kernel.org, broonie@kernel.org, perex@perex.cz,
	amadeuszx.slawinski@linux.intel.com,
	Cezary Rojewski <cezary.rojewski@intel.com>
Subject: [PATCH 3/3] ALSA: control: Fix argument type mismatch
Date: Thu,  9 Jan 2025 13:52:04 +0100	[thread overview]
Message-ID: <20250109125204.3668961-4-cezary.rojewski@intel.com> (raw)
In-Reply-To: <20250109125204.3668961-1-cezary.rojewski@intel.com>

strscpy() expects argument of type "char *", not "unsigned char *".
Found out by Coverity static analyzer.

Fixes: 68fa05d4a82b ("ALSA: control: Introduce snd_ctl_find_id_mixer()")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
---
 include/sound/control.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/sound/control.h b/include/sound/control.h
index e07f6b960641..f7e18a1d144f 100644
--- a/include/sound/control.h
+++ b/include/sound/control.h
@@ -161,7 +161,7 @@ snd_ctl_find_id_mixer(struct snd_card *card, const char *name)
 	struct snd_ctl_elem_id id = {};
 
 	id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
-	strscpy(id.name, name, sizeof(id.name));
+	strscpy((char *)id.name, name, sizeof(id.name));
 	return snd_ctl_find_id(card, &id);
 }
 
-- 
2.25.1


  parent reply	other threads:[~2025-01-09 12:38 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-09 12:52 [PATCH 0/3] ALSA: hda: Compilation and firmware-loading fixes Cezary Rojewski
2025-01-09 12:52 ` [PATCH 1/3] ALSA: hda: Fix compilation of snd_hdac_adsp_xxx() helpers Cezary Rojewski
2025-01-09 12:42   ` Jaroslav Kysela
2025-01-09 14:20     ` Takashi Iwai
2025-01-09 14:41       ` Cezary Rojewski
2025-01-09 14:52         ` Takashi Iwai
2025-01-09 12:52 ` [PATCH 2/3] ALSA: hda: Transfer firmware in two chunks Cezary Rojewski
2025-01-09 14:29   ` Takashi Iwai
2025-01-09 17:13     ` Cezary Rojewski
2025-01-09 12:52 ` Cezary Rojewski [this message]
2025-01-09 14:31   ` [PATCH 3/3] ALSA: control: Fix argument type mismatch Takashi Iwai
2025-01-09 14:47     ` Cezary Rojewski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250109125204.3668961-4-cezary.rojewski@intel.com \
    --to=cezary.rojewski@intel.com \
    --cc=amadeuszx.slawinski@linux.intel.com \
    --cc=broonie@kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox