From: Petr Machata Date: Mon, 28 Mar 2011 18:34:28 +0000 (+0200) Subject: dwarflint: Drop wr_warning X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eda095ddccc41210e43c41a65adc8eaff55596e1;p=thirdparty%2Felfutils.git dwarflint: Drop wr_warning - wr_error is for outright violations. The rest should be passed through wr_message to allow filtering --- diff --git a/dwarflint/check_debug_aranges.cc b/dwarflint/check_debug_aranges.cc index f044b43ef..b0c84e149 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 b8e8f768c..dd8d81dfa 100644 --- a/dwarflint/messages.cc +++ b/dwarflint/messages.cc @@ -271,15 +271,6 @@ wr_error (const struct where *wh, const char *format, ...) va_end (ap); } -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; @@ -332,12 +323,6 @@ wr_message (message_category category) return wr_warning (); } -std::ostream & -wr_warning (where const &wh) -{ - return wr_warning () << wh << ": "; -} - std::ostream & wr_error (where const &wh) { diff --git a/dwarflint/messages.hh b/dwarflint/messages.hh index 49dbd925f..b4c07b8b3 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 d51818eb0..2e23248b8 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;