libunwind-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Libunwind-devel] [PATCH 18/27] Remove unneeded length modifier from sup


From: Tommi Rantala
Subject: [Libunwind-devel] [PATCH 18/27] Remove unneeded length modifier from suppressed match in sscanf() format in tests/crasher.c
Date: Wed, 22 Aug 2012 14:28:44 +0300

GCC is complaining about the `%*jx' match in sscanf() format string.
Replace it with `%*x'; sscanf() will identically match an unsigned
hexadecimal integer without the length modifier.

crasher.c: In function 'write_maps':
crasher.c:30:9: warning: use of assignment suppression and length modifier 
together in gnu_scanf format [-Wformat]
---
 tests/crasher.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/crasher.c b/tests/crasher.c
index aa86976..9a005b9 100644
--- a/tests/crasher.c
+++ b/tests/crasher.c
@@ -24,7 +24,7 @@ void write_maps(char *fname)
 
     while (fgets(buf, sizeof(buf), maps))
     {
-        if (sscanf(buf, "%jx-%*jx %*c%*c%c%*c %*x %*s %*d /%126[^\n]", &addr, 
&exec, path+1) != 3)
+        if (sscanf(buf, "%jx-%*x %*c%*c%c%*c %*x %*s %*d /%126[^\n]", &addr, 
&exec, path+1) != 3)
             continue;
 
         if (exec != 'x')
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]