From 050c534791bb2c75186cbc335a0d25b484249304 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 26 Jan 2017 21:21:50 +0100 Subject: yamcfg: Fix warning about format string. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -O2 -Wall -pedantic -MT yamcfg.o -MD -MP -MF .deps/yamcfg.Tpo -c -o yamcfg.o yamc fg.c yamcfg.c: In function ‘in2hex’: yamcfg.c:83:17: warning: format ‘%x’ expects argument of type ‘unsigned int *’, but argument 3 has type ‘int *’ [-Wformat=] sscanf (str, "%x", &val); ^ Signed-off-by: Ralf Baechle --- yamdrv/yamcfg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yamdrv') diff --git a/yamdrv/yamcfg.c b/yamdrv/yamcfg.c index 98a3fa9..1e40fd2 100644 --- a/yamdrv/yamcfg.c +++ b/yamdrv/yamcfg.c @@ -75,7 +75,7 @@ static unsigned char bitswap (unsigned char c) static int in2hex (char *ptr) { char str[3]; - int val; + unsigned int val; memcpy (str, ptr, 2); str[2] = '\0'; -- cgit v1.2.3