From d3b47a888f0bc66a8590941cfa57ba015b288040 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Fri, 16 Apr 2021 14:11:41 -0500 Subject: [PATCH] ASoC: soc-core: fix signed/unsigned issue cppcheck warning: sound/soc/soc-core.c:2237:13: warning: %x in format string (no. 1) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] } else if (sscanf(name, "%x-%x", &id1, &id2) == 2) { ^ sound/soc/soc-core.c:2237:13: warning: %x in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int] } else if (sscanf(name, "%x-%x", &id1, &id2) == 2) { ^ Signed-off-by: Pierre-Louis Bossart Reviewed-by: Daniel Baluta Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210416191144.27006-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- sound/soc/soc-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 80374c82c501..fb6b3a6194ce 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2219,7 +2219,7 @@ static char *fmt_single_name(struct device *dev, int *id) { const char *devname = dev_name(dev); char *found, *name; - int id1, id2; + unsigned int id1, id2; if (devname == NULL) return NULL; -- 2.11.0