}
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;
}
{
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);
}
testfiles DW_AT-later-version
testrun_compare ./dwarflint --nognu DW_AT-later-version <<EOF
-warning: .debug_abbrev: abbr. attribute 0x15: attribute DW_AT_endianity from later DWARF version.
+warning: .debug_abbrev: abbr. 0x11, attr. endianity: attribute from later DWARF version.
warning: .debug_info: DIE 0xb: DW_AT_low_pc value not below DW_AT_high_pc.
+ warning: .debug_info: DIE 0x29: variable has decl_file, but NOT decl_line
EOF