deprecated methods warning patch

David Scott Page page at cs.utexas.edu
Thu May 2 20:16:45 EDT 2002


Hi,

When compiling with KCC, I get a slew of warnings akin to "overloaded
method fu not completely overridden in class bar", due to deprecated
methods in element.hh. This patch comments out the deprecated methods
and fixes two uses in element.cc in order to get rid of the warnings
(for a userlevel compile).

--
Scott Page

---------------------------------- 8< ---------------------------------
diff -Naur click-20020501/include/click/element.hh click-20020501a/include/click/element.hh
--- click-20020501/include/click/element.hh	Tue Apr 30 22:31:05 2002
+++ click-20020501a/include/click/element.hh	Thu May  2 21:48:29 2002
@@ -183,9 +183,9 @@
  private:
 
   // deprecated methods
-  virtual int configure(const Vector<String> &, ErrorHandler *);
-  virtual int live_reconfigure(const Vector<String> &, ErrorHandler *);
-  virtual void configuration(Vector<String> &, bool *) const;
+  //  virtual int configure(const Vector<String> &, ErrorHandler *);
+  //  virtual int live_reconfigure(const Vector<String> &, ErrorHandler *);
+  //  virtual void configuration(Vector<String> &, bool *) const;
   
   enum { INLINE_PORTS = 4 };
 
diff -Naur click-20020501/lib/element.cc click-20020501a/lib/element.cc
--- click-20020501/lib/element.cc	Fri Apr  5 20:58:09 2002
+++ click-20020501a/lib/element.cc	Thu May  2 21:51:36 2002
@@ -459,13 +459,13 @@
 
 int
 Element::configure(Vector<String> &conf, ErrorHandler *errh)
-{
-  const Vector<String> &conf2(conf);
-  return configure(conf2, errh);
-}
-
-int
-Element::configure(const Vector<String> &conf, ErrorHandler *errh)
+  //{
+  //  const Vector<String> &conf2(conf);
+  //  return configure(conf2, errh);
+  //}
+  //
+  //int
+  //Element::configure(const Vector<String> &conf, ErrorHandler *errh)
 {
   return cp_va_parse(conf, this, errh, cpEnd);
 }
@@ -506,12 +506,12 @@
     return errh->error("cannot reconfigure %e live", this);
 }
 
-int
-Element::live_reconfigure(const Vector<String> &, ErrorHandler *)
-{
-  assert(0);
-  return -1;
-}
+//int
+//Element::live_reconfigure(const Vector<String> &, ErrorHandler *)
+//{
+//  assert(0);
+//  return -1;
+//}
 
 void
 Element::take_state(Element *, ErrorHandler *)
@@ -525,12 +525,12 @@
 
 void
 Element::configuration(Vector<String> &conf) const
-{
-  configuration(conf, (bool *)0);
-}
+  //{
+  //  configuration(conf, (bool *)0);
+  //}
 
-void
-Element::configuration(Vector<String> &conf, bool *) const
+  //void
+//Element::configuration(Vector<String> &conf, bool *) const
 {
   // Handle configuration(void) requests specially by preserving whitespace.
   String s = router()->default_configuration_string(eindex());
@@ -756,7 +756,7 @@
 Element::read_positional_handler(Element *element, void *thunk)
 {
   Vector<String> conf;
-  element->configuration(conf, 0);
+  element->configuration(conf);
   int no = (int)thunk;
   if (no >= conf.size())
     return String();
@@ -774,7 +774,7 @@
 Element::read_keyword_handler(Element *element, void *thunk)
 {
   Vector<String> conf;
-  element->configuration(conf, 0);
+  element->configuration(conf);
   const char *kw = (const char *)thunk;
   String s;
   for (int i = conf.size() - 1; i >= 0; i--)









More information about the click mailing list