]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
Fix ematch warnings with GCC4.0
authorshemminger <shemminger>
Thu, 14 Jul 2005 16:49:27 +0000 (16:49 +0000)
committershemminger <shemminger>
Thu, 14 Jul 2005 16:49:27 +0000 (16:49 +0000)
ChangeLog
tc/emp_ematch.l
tc/m_ematch.c

index 0d457a70e5a7d78363b6377318a7e72ccc0763e2..847e5a26ec11be40d52ff6b592be5d3028e532ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
-2005-07-05  Thomas Graf <tgraf@suug.ch>
+2005-07-14  Thomas Graf <tgraf@suug.ch>
 
-       * Build check for GNU Bison
+       * Make ematch bison/lex build with common flex
+       
+2005-07-10  Stephen Hemminger  <shemminger@osdl.org>
+       
+       * Fix Gcc 4.0 build warnings signed/unsigned
 
 2005-06-23  Jamal Hadi Salim <hadi@znyx.com>
 
index 70cdb9a615f8de0ee72dee2a79d265418064858e..09d535d0510cfc34c91c8dc59226b46081795fe8 100644 (file)
  static void __attribute__ ((unused)) yy_push_state (int  new_state );
  static void __attribute__ ((unused)) yy_pop_state  (void);
  static int  __attribute__ ((unused)) yy_top_state (void );
-%}
-
-%x str
-
-%option 8bit stack warn noyywrap prefix="ematch_"
-%%
 
- static unsigned char *strbuf;
+ static char *strbuf;
  static unsigned int strbuf_size;
  static unsigned int strbuf_index;
 
        strbuf = realloc(strbuf, strbuf_size);
  }
 
- static void strbuf_append_char(unsigned char c)
+ static void strbuf_append_char(char c)
  {
        while (strbuf_index >= strbuf_size)
                strbuf_enlarge();
        strbuf[strbuf_index++] = c;
  }
 
- static void strbuf_append_charp(unsigned char *s)
+ static void strbuf_append_charp(char *s)
  {
        while (strbuf_index >= strbuf_size)
                strbuf_enlarge();
        strbuf_index += strlen(s);
  }
 
+%}
+
+%x str
+
+%option 8bit stack warn noyywrap prefix="ematch_"
+%%
 [ \t\r\n]+
 
 \"                                     {
index 37ef0459763d35b2007c82285a64100dfaca80ad..44c621bc6fa866f6aaa29ae9d7e602312ce7bf67 100644 (file)
@@ -193,7 +193,7 @@ static int parse_tree(struct nlmsghdr *n, struct ematch *tree)
                        addraw_l(n, MAX_MSG, &hdr, sizeof(hdr));
                        addraw_l(n, MAX_MSG, &r, sizeof(r));
                } else {
-                       int num, err;
+                       int num = 0, err;
                        char buf[64];
                        struct ematch_util *e;