From e55089695dc9e2f58ba61d1ad208364c9224ae80 Mon Sep 17 00:00:00 2001 From: drl7x Date: Thu, 29 Nov 2001 02:26:29 +0000 Subject: [PATCH] Work around for the MaxSet(c) >= sizeof c -1 simplification. Added comments to ignore array bounds errors in lex and bison files --- src/Makefile | 4 ++-- src/Makefile.am | 2 +- src/Makefile.in | 2 +- src/bison.head | 3 +++ src/bison.reset | 5 +++++ src/constraintResolve.c | 3 ++- src/flex.head | 6 ++++++ src/flex.reset | 5 +++++ 8 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/Makefile b/src/Makefile index 1ae47b2..9783f13 100644 --- a/src/Makefile +++ b/src/Makefile @@ -416,7 +416,7 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -CFLAGS = -g -O2 +CFLAGS = -g DIST_SOURCES = $(lcl_SOURCES) $(lclint_SOURCES) DIST_COMMON = Makefile.am Makefile.in SOURCES = $(lcl_SOURCES) $(lclint_SOURCES) @@ -884,7 +884,7 @@ lintnew: lintbuffercheck: ./lclint -f lclint.lclintrc $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(ALLSRC) $(LCLSRC) -dump lclint \ +forcehints -misplacedsharequal +showsourceloc -unrecogcomments \ - -supcounts -fcnuse -exportlocal -constuse -mts file -mts filerw +arraybounds + -supcounts -fcnuse -exportlocal -constuse -mts file -mts filerw +arraybounds +arrayboundsread .PHONY: purify purify: $(lclint_OBJECTS) diff --git a/src/Makefile.am b/src/Makefile.am index 2c63cf8..0260981 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -206,7 +206,7 @@ lintnew: lintbuffercheck: ./lclint -f lclint.lclintrc $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(ALLSRC) $(LCLSRC) -dump lclint \ +forcehints -misplacedsharequal +showsourceloc -unrecogcomments \ - -supcounts -fcnuse -exportlocal -constuse -mts file -mts filerw +arraybounds + -supcounts -fcnuse -exportlocal -constuse -mts file -mts filerw +arraybounds +arrayboundsread diff --git a/src/Makefile.in b/src/Makefile.in index 37fcb46..bda63e5 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -884,7 +884,7 @@ lintnew: lintbuffercheck: ./lclint -f lclint.lclintrc $(DEFAULT_INCLUDES) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) +singleinclude $(ALLSRC) $(LCLSRC) -dump lclint \ +forcehints -misplacedsharequal +showsourceloc -unrecogcomments \ - -supcounts -fcnuse -exportlocal -constuse -mts file -mts filerw +arraybounds + -supcounts -fcnuse -exportlocal -constuse -mts file -mts filerw +arraybounds +arrayboundsread .PHONY: purify purify: $(lclint_OBJECTS) diff --git a/src/bison.head b/src/bison.head index 90909a2..aca12ee 100644 --- a/src/bison.head +++ b/src/bison.head @@ -43,5 +43,8 @@ /*@-nullassign@*/ /*@-declundef@*/ +/*drl added 11/27/2001*/ +/*@-arraybounds@*/ +/*@-arrayboundsread@*/ /* < end of bison.head > */ diff --git a/src/bison.reset b/src/bison.reset index b5c3194..005af2e 100644 --- a/src/bison.reset +++ b/src/bison.reset @@ -41,3 +41,8 @@ /*@=dependenttrans@*/ /*@=unqualifiedtrans@*/ /*@=declundef@*/ + + +/*drl added 11/27/2001*/ +/*@=arraybounds@*/ +/*@=arrayboundsread@*/ diff --git a/src/constraintResolve.c b/src/constraintResolve.c index 7d7b8be..034b70d 100644 --- a/src/constraintResolve.c +++ b/src/constraintResolve.c @@ -760,7 +760,8 @@ static bool sizeofBufComp(constraintExpr buf1, constraintExpr expr2) /*@i223@*/ /*this may be the wronge thing to test for */ if (sRef_similarRelaxed(s1, s2) || sRef_sameName (s1, s2) ) { - if (ctype_isFixedArray (sRef_getType (s2) ) ) + /*@i22*/ /* get rid of this test of now */ + /* if (ctype_isFixedArray (sRef_getType (s2) ) ) */ return TRUE; } return FALSE; diff --git a/src/flex.head b/src/flex.head index b40ce75..0dc336a 100644 --- a/src/flex.head +++ b/src/flex.head @@ -53,6 +53,12 @@ /*@-casebreak@*/ /*@-retvalother@*/ + +/*drl added 11/27/2001*/ +/*@-arraybounds@*/ +/*@-arrayboundsread@*/ + + # ifdef __LCLINT__ /*@-redecl@*/ /*@-type@*/ extern int lsllex (void); diff --git a/src/flex.reset b/src/flex.reset index 0ef79de..f0b2b28 100644 --- a/src/flex.reset +++ b/src/flex.reset @@ -50,6 +50,11 @@ /*@=redecl@*/ /*@=retvalother@*/ + +/*drl added 11/27/2001*/ +/*@=arraybounds@*/ +/*@=arrayboundsread@*/ + # ifdef OSF # define __GNUC__ # endif -- 2.45.1