summaryrefslogtreecommitdiff
path: root/scan.l
diff options
context:
space:
mode:
authorVern Paxson <vern@ee.lbl.gov>1990-03-20 13:15:30 +0000
committerVern Paxson <vern@ee.lbl.gov>1990-03-20 13:15:30 +0000
commit1b2e26711b0ab821a8e700d81366070c7353130e (patch)
tree97f402a4c2062a6fb70f6f4e177c534699f321db /scan.l
parent0b1c3ab801625843a84f7c75e6165a098f3abdb3 (diff)
cast added to malloc() call to keep lint happy.
Diffstat (limited to 'scan.l')
-rw-r--r--scan.l7
1 files 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 ( '[' );