backtrace: Suppress dumb GCC warning on x86-64.
authorBen Pfaff <blp@nicira.com>
Fri, 6 Nov 2009 18:22:55 +0000 (10:22 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 9 Nov 2009 18:30:10 +0000 (10:30 -0800)
Without this change GCC warns "use of assignment suppression and length
modifier together in scanf format", which doesn't actually point out any
real problem (and why would it?  Google turns up nothing interesting).

lib/backtrace.c

index 0999a08..42ab8c4 100644 (file)
@@ -42,7 +42,7 @@ get_max_stack(void)
     for (line_number = 1; fgets(line, sizeof line, f); line_number++) {
         if (strstr(line, "[stack]")) {
             uintptr_t end;
-            if (sscanf(line, "%*"SCNxPTR"-%"SCNxPTR, &end) != 1) {
+            if (sscanf(line, "%*x-%"SCNxPTR, &end) != 1) {
                 VLOG_WARN("%s:%d: parse error", file_name, line_number);
                 continue;
             }