]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Drop wr_warning
authorPetr Machata <pmachata@redhat.com>
Mon, 28 Mar 2011 18:34:28 +0000 (20:34 +0200)
committerPetr Machata <pmachata@redhat.com>
Mon, 28 Mar 2011 18:34:28 +0000 (20:34 +0200)
- wr_error is for outright violations.  The rest should be passed through
  wr_message to allow filtering

dwarflint/check_debug_aranges.cc
dwarflint/messages.cc
dwarflint/messages.hh
dwarflint/reloc.cc

index f044b43ef9dd814193a39686f41e6610289fbf87..b0c84e149e551653cdbd84e5576cac4ad60bfe33 100644 (file)
@@ -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;
        }
index b8e8f768cc473f5c1053cf1bb902393d15e4bd6a..dd8d81dfab9cd166e01b046de6511f693ed57166 100644 (file)
@@ -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)
 {
index 49dbd925fbda490a11096a3f012752ae939829a9..b4c07b8b3cd2d0b1d6e1dbad24877ff92e86e145 100644 (file)
@@ -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);
index d51818eb03175b82944afa0b36713a3bd9a7cf99..2e23248b8d6e5a2e0563f3a7c42b601623b58cec 100644 (file)
@@ -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;