diff options
author | rlar <rlar> | 2016-03-16 19:47:44 +0100 |
---|---|---|
committer | Will Estes <westes575@gmail.com> | 2016-03-18 14:52:04 -0400 |
commit | 0292299ec586910fbee69792aaedfa40ed2f5ab4 (patch) | |
tree | 941e7ed8562c2d58cbad38d6d42a8ea530137bf9 /tests/yyextra.l | |
parent | ed59d3e0664b938f7f4854692349b9d59839fad6 (diff) |
warning: conversion to 'size_t' from 'int' may change the sign of the result [-Wsign-conversion]
Diffstat (limited to 'tests/yyextra.l')
-rw-r--r-- | tests/yyextra.l | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/yyextra.l b/tests/yyextra.l index bfaae34..bf2a6eb 100644 --- a/tests/yyextra.l +++ b/tests/yyextra.l @@ -72,7 +72,7 @@ main (void) 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++ ) |