From: Ben Pfaff Date: Fri, 6 Nov 2009 18:22:55 +0000 (-0800) Subject: backtrace: Suppress dumb GCC warning on x86-64. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7559c396688cbbc6fab80897bbb4b993646bcf54;p=openvswitch backtrace: Suppress dumb GCC warning on x86-64. 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). --- diff --git a/lib/backtrace.c b/lib/backtrace.c index 0999a081..42ab8c48 100644 --- a/lib/backtrace.c +++ b/lib/backtrace.c @@ -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; }