summaryrefslogtreecommitdiffstats
path: root/yamdrv
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-01-26 21:21:50 +0100
committerRalf Baechle <ralf@linux-mips.org>2017-01-26 21:58:50 +0100
commit050c534791bb2c75186cbc335a0d25b484249304 (patch)
tree2c0896e073c6af6001c466140621ae2b6ac1d7eb /yamdrv
parent4abaef9b52543f64fba86b2ef26809a336a80afe (diff)
yamcfg: Fix warning about format string.
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 <ralf@linux-mips.org>
Diffstat (limited to 'yamdrv')
-rw-r--r--yamdrv/yamcfg.c2
1 files changed, 1 insertions, 1 deletions
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';