diff options
Diffstat (limited to 'tests/yyextra.l')
-rw-r--r-- | tests/yyextra.l | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/yyextra.l b/tests/yyextra.l index 8957cbb..bf2a6eb 100644 --- a/tests/yyextra.l +++ b/tests/yyextra.l @@ -62,7 +62,7 @@ static void append_char (char c, yyscan_t scanner ); int main(void); int -main () +main (void) { yyscan_t scanner; struct Buffer * buf; @@ -72,7 +72,7 @@ main () buf->curr_len =0; buf->max_len = 4; buf->grow_len = 100; - buf->data = malloc(buf->max_len); + buf->data = malloc((size_t) buf->max_len); testlex_init(&scanner); testset_in( stdin, scanner); @@ -103,7 +103,7 @@ static void append_char (char c, yyscan_t scanner ) new_buf = malloc(sizeof(struct Buffer)); new_buf->max_len = buf->max_len + buf->grow_len; new_buf->grow_len = buf->grow_len; - new_buf->data = malloc(new_buf->max_len); + new_buf->data = malloc((size_t) new_buf->max_len); for( new_buf->curr_len = 0; new_buf->curr_len < buf->curr_len; new_buf->curr_len++ ) |