summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2011-07-05 11:38:34 +0200
committerPaolo Bonzini <bonzini@gnu.org>2012-01-03 14:08:22 +0100
commit988961a3e00bf51bd8a0bc3d1c9736cc88e07e5e (patch)
tree05a8d121935c1fdbb8d75ebe4ffec2867a38a1c1
parent3e13407d4cfcbac44a9a50a419a1d33ee2205788 (diff)
downloadgrep-988961a3e00bf51bd8a0bc3d1c9736cc88e07e5e.tar.gz
dfa: change position_set nelem to size_t
* src/dfa.c (REALLOC_IF_NECESSARY): Disable assertion, to avoid warnings from -Wtype-limits. (position_set): Change nelem to a size_t.
-rw-r--r--src/dfa.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dfa.c b/src/dfa.c
index e601b030..dfc108a4 100644
--- a/src/dfa.c
+++ b/src/dfa.c
@@ -246,7 +246,7 @@ typedef struct
typedef struct
{
position *elems; /* Elements of this position set. */
- int nelem; /* Number of elements in this set. */
+ size_t nelem; /* Number of elements in this set. */
size_t alloc; /* Number of elements allocated in ELEMS. */
} position_set;
@@ -430,7 +430,6 @@ static void regexp (void);
#define REALLOC_IF_NECESSARY(p, n_alloc, n_required) \
do \
{ \
- assert (0 <= (n_required)); \
if ((n_alloc) <= (n_required)) \
{ \
size_t new_n_alloc = (n_required) + !(p); \