diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2017-01-26 21:24:12 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2017-01-26 21:58:52 +0100 |
commit | d373f77d7d116b1407b1aa9685f4067123f862dc (patch) | |
tree | 8c108619731999d7a293d74e18af707fc256351b /yamdrv/mcs2h.c | |
parent | 050c534791bb2c75186cbc335a0d25b484249304 (diff) |
mcsh: Fix warning about format string.
gcc -DHAVE_CONFIG_H -I. -I.. -D_GNU_SOURCE -O2 -Wall -pedantic -MT mcs2h.o -MD -MP -MF .deps/mcs2h.Tpo -c -o mcs2h.o mcs2h.c
mcs2h.c: In function ‘in2hex’:
mcs2h.c:13:16: warning: format ‘%x’ expects argument of type ‘unsigned int *’, but argument 3 has type ‘int *’ [-Wformat=]
sscanf(str, "%x", &val);
^
mcs2h.c: In function ‘in4hex’:
mcs2h.c:41:16: 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/mcs2h.c')
-rw-r--r-- | yamdrv/mcs2h.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/yamdrv/mcs2h.c b/yamdrv/mcs2h.c index bf9d0e2..7f0d510 100644 --- a/yamdrv/mcs2h.c +++ b/yamdrv/mcs2h.c @@ -5,7 +5,7 @@ int in2hex(char *ptr) { char str[3]; - int val; + unsigned int val; memcpy(str, ptr, 2); str[2] = '\0'; @@ -33,7 +33,7 @@ unsigned char swap(unsigned char c) int in4hex(char *ptr) { char str[5]; - int val; + unsigned int val; memcpy(str, ptr, 4); str[4] = '\0'; |