]> granicus.if.org Git - flex/commitdiff
cast added to malloc() call to keep lint happy.
authorVern Paxson <vern@ee.lbl.gov>
Tue, 20 Mar 1990 13:15:30 +0000 (13:15 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Tue, 20 Mar 1990 13:15:30 +0000 (13:15 +0000)
scan.l

diff --git a/scan.l b/scan.l
index 922f0d220beb08a3854f90f2c430c5619e4bcc16..31fa754cc2db56a93df2d39dbcc2aed8f84d535d 100644 (file)
--- 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 ( '[' );