From: Vern Paxson Date: Tue, 20 Mar 1990 13:15:30 +0000 (+0000) Subject: cast added to malloc() call to keep lint happy. X-Git-Tag: flex-2-5-5b~528 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b2e26711b0ab821a8e700d81366070c7353130e;p=flex cast added to malloc() call to keep lint happy. --- 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 ( '[' );