From: Petr Machata Date: Thu, 14 Apr 2011 16:33:24 +0000 (+0200) Subject: Merge branch 'dwarf' into pmachata/dwarflint X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=927a2e9eed7dcaf380652bc8bb2575dae3892b7a;p=thirdparty%2Felfutils.git Merge branch 'dwarf' into pmachata/dwarflint Conflicts: dwarflint/messages.cc --- 927a2e9eed7dcaf380652bc8bb2575dae3892b7a diff --cc dwarflint/messages.cc index e7ea4a495,995220c3f..7b6bb0839 --- a/dwarflint/messages.cc +++ b/dwarflint/messages.cc @@@ -263,11 -256,11 +263,11 @@@ wr_verror (locus const &loc, const cha } static void -wr_vwarning (const struct where *wh, const char *format, va_list ap) +wr_vwarning (locus const &loc, const char *format, va_list ap) { - printf ("warning: %s", loc.format ().c_str ()); - printf ("%s", where_fmt (wh, NULL)); ++ printf ("%s", loc.format ().c_str ()); vprintf (format, ap); - where_fmt_chain (wh, "warning"); + format_chain (loc, "warning"); ++error_count; } @@@ -286,12 -279,16 +286,16 @@@ wr_message (unsigned long category, loc { va_list ap; va_start (ap, format); - if (message_accept (&warning_criteria, category)) + // Clumsy duplicate filtering. Use format as key. + bool whether = false; + message_category cat = (message_category) category; + wr_message (cat).id (format, whether); + if (whether && message_accept (&warning_criteria, category)) { if (message_accept (&error_criteria, category)) - wr_verror (wh, format, ap); + wr_verror (*loc, format, ap); else - wr_vwarning (wh, format, ap); + wr_vwarning (*loc, format, ap); } va_end (ap); } diff --cc dwarflint/tests/run-DW_AT-later-version.sh index 92dc17a34,3565dc88c..00b9a3533 --- a/dwarflint/tests/run-DW_AT-later-version.sh +++ b/dwarflint/tests/run-DW_AT-later-version.sh @@@ -30,6 -30,7 +30,7 @@@ srcdir=$srcdir/test testfiles DW_AT-later-version testrun_compare ./dwarflint --nognu DW_AT-later-version <