diff options
author | Petr Machata <[email protected]> | 2011-03-28 20:34:28 +0200 |
---|---|---|
committer | Petr Machata <[email protected]> | 2011-03-28 20:34:28 +0200 |
commit | eda095ddccc41210e43c41a65adc8eaff55596e1 (patch) | |
tree | 52e930a3c589ed6d09e6825fcd2d2a144bd44163 | |
parent | eb51470a4485373fc8e971f66c0c712e8f71e940 (diff) |
dwarflint: Drop wr_warning
- wr_error is for outright violations. The rest should be passed through
wr_message to allow filtering
-rw-r--r-- | dwarflint/check_debug_aranges.cc | 2 | ||||
-rw-r--r-- | dwarflint/messages.cc | 17 | ||||
-rw-r--r-- | dwarflint/messages.hh | 5 | ||||
-rw-r--r-- | dwarflint/reloc.cc | 2 |
4 files changed, 3 insertions, 23 deletions
diff --git a/dwarflint/check_debug_aranges.cc b/dwarflint/check_debug_aranges.cc index f044b43e..b0c84e14 100644 --- a/dwarflint/check_debug_aranges.cc +++ b/dwarflint/check_debug_aranges.cc @@ -303,7 +303,7 @@ check_aranges_structural (struct elf_file *file, } if (segment_size != 0) { - wr_warning (&where, ": dwarflint can't handle segment_size != 0.\n"); + wr_error (&where, ": dwarflint can't handle segment_size != 0.\n"); retval = false; goto next; } diff --git a/dwarflint/messages.cc b/dwarflint/messages.cc index b8e8f768..dd8d81df 100644 --- a/dwarflint/messages.cc +++ b/dwarflint/messages.cc @@ -272,15 +272,6 @@ wr_error (const struct where *wh, const char *format, ...) } void -wr_warning (const struct where *wh, const char *format, ...) -{ - va_list ap; - va_start (ap, format); - wr_vwarning (wh, format, ap); - va_end (ap); -} - -void wr_message (unsigned long category, const struct where *wh, const char *format, ...) { @@ -307,7 +298,7 @@ namespace } } -std::ostream & +static std::ostream & wr_warning () { ++error_count; @@ -333,12 +324,6 @@ wr_message (message_category category) } std::ostream & -wr_warning (where const &wh) -{ - return wr_warning () << wh << ": "; -} - -std::ostream & wr_error (where const &wh) { return wr_error () << wh << ": "; diff --git a/dwarflint/messages.hh b/dwarflint/messages.hh index 49dbd925..b4c07b8b 100644 --- a/dwarflint/messages.hh +++ b/dwarflint/messages.hh @@ -115,9 +115,6 @@ message_criteria operator ! (message_term const &); extern void wr_error (const struct where *wh, const char *format, ...) __attribute__ ((format (printf, 2, 3))); -extern void wr_warning (const struct where *wh, const char *format, ...) - __attribute__ ((format (printf, 2, 3))); - extern void wr_message (unsigned long category, const struct where *wh, const char *format, ...) __attribute__ ((format (printf, 3, 4))); @@ -153,8 +150,6 @@ extern struct message_criteria warning_criteria; /* Accepted (warning) messages, that are turned into errors. */ extern struct message_criteria error_criteria; -std::ostream &wr_warning (where const &wh); -std::ostream &wr_warning (); std::ostream &wr_error (where const &wh); std::ostream &wr_error (); std::ostream &wr_message (where const &wh, message_category cat); diff --git a/dwarflint/reloc.cc b/dwarflint/reloc.cc index d51818eb..2e23248b 100644 --- a/dwarflint/reloc.cc +++ b/dwarflint/reloc.cc @@ -180,7 +180,7 @@ do_one_relocation (elf_file const *file, && ELF64_ST_TYPE (symbol->st_info) == STT_SECTION) { if (sym_value != 0) - wr_warning (reloc_where) + wr_message (reloc_where, mc_reloc | mc_impact_1) << "relocation formed using STT_SECTION symbol with non-zero value." << std::endl; |