]> granicus.if.org Git - flex/commitdiff
yytbl_data_compress(), change type of local newsz to get rid of warnings
authorrlar <rlar>
Tue, 1 Mar 2016 16:43:44 +0000 (17:43 +0100)
committerWill Estes <westes575@gmail.com>
Tue, 8 Mar 2016 20:20:45 +0000 (15:20 -0500)
src/tables.c

index df4fb58e8c64552c6b831786863667ede7aad42c..d8bb237f87fb1e470e693ae8645419920bf4c0ea 100644 (file)
@@ -460,7 +460,8 @@ static size_t min_int_size (struct yytbl_data *tbl)
  */
 void yytbl_data_compress (struct yytbl_data *tbl)
 {
-       flex_int32_t i, newsz, total_len;
+       flex_int32_t i, total_len;
+       size_t newsz;
        struct yytbl_data newtbl;
 
        yytbl_data_init (&newtbl, tbl->td_id);
@@ -471,11 +472,11 @@ void yytbl_data_compress (struct yytbl_data *tbl)
        newsz = min_int_size (tbl);
 
 
-       if (newsz == (int) YYTDFLAGS2BYTES (tbl->td_flags))
+       if (newsz == YYTDFLAGS2BYTES (tbl->td_flags))
                /* No change in this table needed. */
                return;
 
-       if (newsz > (int) YYTDFLAGS2BYTES (tbl->td_flags)) {
+       if (newsz > YYTDFLAGS2BYTES (tbl->td_flags)) {
                flex_die (_("detected negative compression"));
                return;
        }