diff options
Diffstat (limited to 'tests/mem_nr.l')
-rw-r--r-- | tests/mem_nr.l | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/mem_nr.l b/tests/mem_nr.l index f25848f..b7cf343 100644 --- a/tests/mem_nr.l +++ b/tests/mem_nr.l @@ -96,7 +96,7 @@ void * yyalloc(yy_size_t n) if( nptrs >= arrsz){ /* increase array size by 1 */ arrsz++; - ptrs = realloc(ptrs, arrsz * sizeof(struct memsz)); + ptrs = realloc(ptrs, (size_t) arrsz * sizeof(struct memsz)); ptrs[nptrs].p = 0; ptrs[nptrs].sz = 0; } @@ -158,7 +158,7 @@ void yyfree(void* p) int main(void); int -main () +main (void) { arrsz = 1; ptrs = calloc(1, sizeof(struct memsz)); @@ -166,8 +166,8 @@ main () yyin = stdin; yyout = stdout; - yylex(); - yylex_destroy(); + testlex(); + testlex_destroy(); free(ptrs); if ( nptrs > 0 || total_mem > 0){ |