From 0292299ec586910fbee69792aaedfa40ed2f5ab4 Mon Sep 17 00:00:00 2001 From: rlar Date: Wed, 16 Mar 2016 19:47:44 +0100 Subject: warning: conversion to 'size_t' from 'int' may change the sign of the result [-Wsign-conversion] --- tests/yyextra.l | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/yyextra.l') 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++ ) -- cgit v1.2.3