From 1b2e26711b0ab821a8e700d81366070c7353130e Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Tue, 20 Mar 1990 13:15:30 +0000 Subject: [PATCH] cast added to malloc() call to keep lint happy. --- scan.l | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scan.l b/scan.l index 922f0d2..31fa754 100644 --- a/scan.l +++ b/scan.l @@ -53,7 +53,7 @@ static char rcsid[] = return ( NAME ); #define PUT_BACK_STRING(str, start) \ - for ( i = strlen( (char *) str ) - 1; i >= start; --i ) \ + for ( i = strlen( (char *) (str) ) - 1; i >= start; --i ) \ unput((str)[i]) #define CHECK_REJECT(str) \ @@ -133,7 +133,8 @@ ESCSEQ \\([^\n]|[0-9]{1,3}|x[0-9a-f]{1,2}) %t{OPTWS}\n { ++linenum; - xlation = (int *) malloc( sizeof( int ) * csize ); + xlation = + (int *) malloc( sizeof( int ) * (unsigned) csize ); if ( ! xlation ) flexfatal( @@ -331,7 +332,7 @@ ESCSEQ \\([^\n]|[0-9]{1,3}|x[0-9a-f]{1,2}) /* push back everything but the leading bracket * so the ccl can be rescanned */ - PUT_BACK_STRING((char *) nmstr, 1); + PUT_BACK_STRING((Char *) nmstr, 1); BEGIN(FIRSTCCL); return ( '[' ); -- 2.40.0