From 107b60d620ee0d17638c46d0999ff3db242b962a Mon Sep 17 00:00:00 2001 From: evans1629 Date: Tue, 25 Sep 2001 12:55:32 +0000 Subject: [PATCH] Fixed unsignedcompare test. Removed diag for unclosed files. --- src/DATE | 2 +- src/Headers/herald.h | 6 +- src/Headers/herald.last | 6 +- src/Headers/local_constants.h | 4 +- src/fileTable.c | 9 +-- src/lastversion | 2 +- src/mtreader.c | 2 +- src/osd.c | 120 ++++++++++++++++++++++++++++++++++ src/sort.c | 2 +- test/Makefile | 1 - test/abst_t.lcs | 2 +- test/abstptr.lcs | 2 +- test/alias.lcs | 2 +- test/alias2.lcs | 2 +- test/alias3.lcs | 2 +- test/alias3.lh | 2 +- test/alias4.lcs | 2 +- test/alias4.lh | 2 +- test/alias5.lcs | 2 +- test/alias5.lh | 2 +- test/argorder2.lcs | 2 +- test/argorder4.lcs | 2 +- test/args.lcs | 2 +- test/cast.lcs | 2 +- test/db1/bool.lcs | 2 +- test/db1/bool.lh | 2 +- test/db1/dbase.lcs | 2 +- test/db1/dbase.lh | 2 +- test/db1/employee.lcs | 2 +- test/db1/employee.lh | 2 +- test/db1/empset.lcs | 2 +- test/db1/empset.lh | 2 +- test/db1/erc.lcs | 2 +- test/db1/erc.lh | 2 +- test/db1/eref.lcs | 2 +- test/db1/eref.lh | 2 +- test/db1/ereftab.lcs | 2 +- test/db1/ereftab.lh | 2 +- test/db2/dbase.lcs | 2 +- test/db2/dbase.lh | 2 +- test/db2/employee.lcs | 2 +- test/db2/employee.lh | 2 +- test/db2/empset.lcs | 2 +- test/db2/empset.lh | 2 +- test/db2/erc.lcs | 2 +- test/db2/erc.lh | 2 +- test/db2/eref.lcs | 2 +- test/db2/eref.lh | 2 +- test/db2/ereftab.lcs | 2 +- test/db2/ereftab.lh | 2 +- test/db3/bool.lcs | 2 +- test/db3/bool.lh | 2 +- test/db3/check.lcs | 2 +- test/db3/check.lh | 2 +- test/db3/dbase.lcs | 2 +- test/db3/dbase.lh | 2 +- test/db3/employee.lcs | 2 +- test/db3/employee.lh | 2 +- test/db3/empset.lcs | 2 +- test/db3/empset.lh | 2 +- test/db3/erc.lcs | 2 +- test/db3/erc.lh | 2 +- test/db3/eref.lcs | 2 +- test/db3/eref.lh | 2 +- test/db3/ereftab.lcs | 2 +- test/db3/ereftab.lh | 2 +- test/decl2.lcs | 2 +- test/enum.lcs | 2 +- test/glob.lcs | 2 +- test/impabstract.lcs | 2 +- test/iter.lcs | 2 +- test/macros.lcs | 2 +- test/macrosef.lcs | 2 +- test/modtest.lcs | 2 +- test/mut.lcs | 2 +- test/mut.lh | 2 +- test/null6.lcd | 2 +- test/null6.lcs | 2 +- test/observer.lcs | 2 +- test/oldstyle.lcs | 2 +- test/outglob.lcs | 2 +- test/outparam.lcs | 2 +- test/repexpose.lcs | 2 +- test/repexpose.lh | 2 +- test/special.lcs | 2 +- test/tests2.2.expect | 1 - test/tests2.2.out | 84 ++++++++++++++++++++++++ test/tests2.2/bool.lcs | 2 +- test/tests2.4/subdir/main.lcs | 2 +- test/tests2.5/newlint.lcd | 2 +- test/tq.lcs | 2 +- test/ud2.lcs | 2 +- 92 files changed, 301 insertions(+), 98 deletions(-) create mode 100644 test/tests2.2.out diff --git a/src/DATE b/src/DATE index cdf52e8..1a942cb 100644 --- a/src/DATE +++ b/src/DATE @@ -1 +1 @@ -10 September 2001 +25 September 2001 diff --git a/src/Headers/herald.h b/src/Headers/herald.h index bcb3a88..0c1e3b7 100644 --- a/src/Headers/herald.h +++ b/src/Headers/herald.h @@ -1,7 +1,7 @@ /* herald.h - created automatically by gmake updateversion */ /*@constant observer char *LCL_VERSION;@*/ -# define LCL_VERSION "LCLint 3.0.0.16 --- 10 September 2001" +# define LCL_VERSION "LCLint 3.0.0.17 --- 25 September 2001" /*@constant observer char *LCL_PARSE_VERSION;@*/ -# define LCL_PARSE_VERSION "LCLint 3.0.0.16" +# define LCL_PARSE_VERSION "LCLint 3.0.0.17" /*@constant observer char *LCL_COMPILE;@*/ -# define LCL_COMPILE "Compiled using gcc -DSTDC_HEADERS=1 on Linux matthews.cs.Virginia.EDU 2.4.3-12 #1 Fri Jun 8 13:35:30 EDT 2001 i686 unknown by drl7x" +# define LCL_COMPILE "Compiled using gcc -Wall -g on Linux paisley 2.4.3-12 #1 Fri Jun 8 13:35:30 EDT 2001 i686 unknown by evans" diff --git a/src/Headers/herald.last b/src/Headers/herald.last index bcb3a88..0c1e3b7 100644 --- a/src/Headers/herald.last +++ b/src/Headers/herald.last @@ -1,7 +1,7 @@ /* herald.h - created automatically by gmake updateversion */ /*@constant observer char *LCL_VERSION;@*/ -# define LCL_VERSION "LCLint 3.0.0.16 --- 10 September 2001" +# define LCL_VERSION "LCLint 3.0.0.17 --- 25 September 2001" /*@constant observer char *LCL_PARSE_VERSION;@*/ -# define LCL_PARSE_VERSION "LCLint 3.0.0.16" +# define LCL_PARSE_VERSION "LCLint 3.0.0.17" /*@constant observer char *LCL_COMPILE;@*/ -# define LCL_COMPILE "Compiled using gcc -DSTDC_HEADERS=1 on Linux matthews.cs.Virginia.EDU 2.4.3-12 #1 Fri Jun 8 13:35:30 EDT 2001 i686 unknown by drl7x" +# define LCL_COMPILE "Compiled using gcc -Wall -g on Linux paisley 2.4.3-12 #1 Fri Jun 8 13:35:30 EDT 2001 i686 unknown by evans" diff --git a/src/Headers/local_constants.h b/src/Headers/local_constants.h index fb04033..59668c3 100644 --- a/src/Headers/local_constants.h +++ b/src/Headers/local_constants.h @@ -2,6 +2,6 @@ /*@constant observer char *SYSTEM_LIBDIR;@*/ # define SYSTEM_LIBDIR "/usr/include" /*@constant observer char *DEFAULT_LARCHPATH;@*/ -# define DEFAULT_LARCHPATH ".:/af9/drl7x/reTmp/LCLintDev/lib" +# define DEFAULT_LARCHPATH "/usr/local/lclint/lib" /*@constant observer char *DEFAULT_LCLIMPORTDIR;@*/ -# define DEFAULT_LCLIMPORTDIR "/af9/drl7x/reTmp/LCLintDev/imports" +# define DEFAULT_LCLIMPORTDIR "/usr/local/lclint/imports" diff --git a/src/fileTable.c b/src/fileTable.c index 8b90b04..658d500 100644 --- a/src/fileTable.c +++ b/src/fileTable.c @@ -991,11 +991,12 @@ void fileTable_closeAll (fileTable ft) for (i = 0; i < ft->nopen; i++) { + /* + lldiagmsg (message ("Unclosed file at exit: %s", ft->openelements[i]->fname)); + */ + + (void) fclose (ft->openelements[i]->f); /* No check - cleaning up after errors */ lldiagmsg (message ("Unclosed file at exit: %s", cstring_toCharsSafe (ft->openelements[i]->fname))); - - /*@-retvalint@*/ - fclose (ft->openelements[i]->f); /* No check - cleaning up after errors */ - /*@=retvalint@*/ ft->openelements[i]->f = NULL; foentry_free (ft->openelements[i]); ft->openelements[i] = NULL; diff --git a/src/lastversion b/src/lastversion index 5a776e2..74be2a9 100644 --- a/src/lastversion +++ b/src/lastversion @@ -1,2 +1,2 @@ -3.0.0.16 +3.0.0.17 diff --git a/src/mtreader.c b/src/mtreader.c index b069fbe..97f4e46 100644 --- a/src/mtreader.c +++ b/src/mtreader.c @@ -83,7 +83,7 @@ void mtreader_readFile (cstring infile) (void) mtparse (); context_exitMTfile (); - inputStream_close (sourceFile); + check (inputStream_close (sourceFile)); inputStream_free (sourceFile); } diff --git a/src/osd.c b/src/osd.c index 0e82754..484eba9 100644 --- a/src/osd.c +++ b/src/osd.c @@ -648,3 +648,123 @@ bool osd_equalCanonicalPrefix (cstring dirpath, cstring prefixpath) # endif } +# if 0 +/* +** This code provided by Herbert Martin Dietze, to canonicalize path names. +*/ + +char *osd_getcwd (/*@returned@*/ char *str, size_t size) +{ + return getcwd (str, size); +} + +/*@null@*/ /*@observer@*/ char * +osd_dirNext (char *str) +{ + char *p1 = strchr (str, '/'); + char *p2 = strchr (str, '\\'); + + if (p1 == NULL) + { + if (p2 != NULL) + { + return p2 + 1; + } + else + { + return NULL; + } + } + else if (p2 == NULL) + { + return p1 + 1; + } + else /* both not null */ + { + return (p1 < p2 ? p1 : p2) + 1; + } +} + +static void +osd_dirShift (char *str, size_t num) /*@modifies str@*/ +{ + int i; + + assert (num <= strlen (str)); + + for (i = 0; str[i] != '\0'; i++) + { + str[i] = str[i + num]; + } +} + +bool +osd_dirDotdot (char *str) +{ + return str[0] == '.' && str[1] == '.' && osd_isConnectChar (str[2]); +} + +void +osd_dirNormalize (char *str) +{ + char *pos1, *pos2; + + for (; osd_isConnectChar (str[0]); str++) + { + } + + for (; str != NULL && osd_dirDotdot (str); str = osd_dirNext (str)) + { + } + + for (pos1 = pos2 = str; + pos1 != NULL; + pos2 = pos1, pos1 = osd_dirNext (pos1)) + { + /* remove redundant `./' entry */ + while (pos1[0] == '.' && osd_isConnectChar (pos1[1])) + { + osd_dirShift (pos1, 2); + } + + /* remove redundant `foo/../' entry */ + if (osd_dirDotdot (pos1) && pos2 < pos1) + { + osd_dirShift (pos2, pos1 - pos2 + 1); + osd_dirNormalize (str); + } + } +} + +/*@null@*/ char * +osd_dirAbsolute (char *str) +{ + char *ret = NULL; + size_t size = PATH_MAX * sizeof (*ret); + + if (osd_isConnectChar (str[0])) + { + ret = dmalloc ((strlen (str) + 1) * sizeof (*ret)); + strcpy (ret, str); + } + else + { + ret = dmalloc (size); + + ret = osd_getcwd (ret, size); + ret = realloc (ret, (strlen (str) + strlen (ret) + 2) * sizeof (*ret)); + + if (ret == NULL) + { + return NULL; + } + + strcat (ret, CONNECTSTR); + strcat (ret, str); + } + + osd_dirNormalize (ret); + return ret; +} + +# endif diff --git a/src/sort.c b/src/sort.c index b52d5c0..73818b7 100644 --- a/src/sort.c +++ b/src/sort.c @@ -2636,7 +2636,7 @@ parseSortLine (char *line, ltoken t, inputStream s, if (strName != lsymbol_undefined && strMemList != NULL) { sort asort = sort_construct (strName, SRT_STRUCT, NOSORTHANDLE, tagName, - TRUE, NOSORTHANDLE, strMemList); + TRUE, NOSORTHANDLE, strMemList); if (tagName != lsymbol_undefined) { diff --git a/test/Makefile b/test/Makefile index 1c513a4..e30ce38 100644 --- a/test/Makefile +++ b/test/Makefile @@ -655,7 +655,6 @@ freearray: ### tests2.2: - @echo " Note: expect difference in name of unclosed file." setenv LCLINT '$(LCLINTRN)'; cd tests2.2 ; $(MAKE) -e tests2.2a: diff --git a/test/abst_t.lcs b/test/abst_t.lcs index 64cb20f..7946afe 100644 --- a/test/abst_t.lcs +++ b/test/abst_t.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/abstptr.lcs b/test/abstptr.lcs index 000dc4d..dd876ca 100644 --- a/test/abstptr.lcs +++ b/test/abstptr.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/alias.lcs b/test/alias.lcs index 6fbd7d4..fc507dd 100644 --- a/test/alias.lcs +++ b/test/alias.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/alias2.lcs b/test/alias2.lcs index 528a565..cb81243 100644 --- a/test/alias2.lcs +++ b/test/alias2.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/alias3.lcs b/test/alias3.lcs index 050bf23..8bf1673 100644 --- a/test/alias3.lcs +++ b/test/alias3.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/alias3.lh b/test/alias3.lh index cafd3e2..73f0f70 100644 --- a/test/alias3.lh +++ b/test/alias3.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" diff --git a/test/alias4.lcs b/test/alias4.lcs index a78b2d5..21e40f2 100644 --- a/test/alias4.lcs +++ b/test/alias4.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/alias4.lh b/test/alias4.lh index f607d04..db13d37 100644 --- a/test/alias4.lh +++ b/test/alias4.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "mut.h" diff --git a/test/alias5.lcs b/test/alias5.lcs index 72d4d2a..a5e0bde 100644 --- a/test/alias5.lcs +++ b/test/alias5.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/alias5.lh b/test/alias5.lh index d4bd530..f591119 100644 --- a/test/alias5.lh +++ b/test/alias5.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" diff --git a/test/argorder2.lcs b/test/argorder2.lcs index 3cd0db5..dec4e87 100644 --- a/test/argorder2.lcs +++ b/test/argorder2.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/argorder4.lcs b/test/argorder4.lcs index f08d8db..acdf6fb 100644 --- a/test/argorder4.lcs +++ b/test/argorder4.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/args.lcs b/test/args.lcs index 361e694..143bf6c 100644 --- a/test/args.lcs +++ b/test/args.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/cast.lcs b/test/cast.lcs index 4b0d2ee..7b7e08b 100644 --- a/test/cast.lcs +++ b/test/cast.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db1/bool.lcs b/test/db1/bool.lcs index ff3e908..bcadca1 100644 --- a/test/db1/bool.lcs +++ b/test/db1/bool.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db1/bool.lh b/test/db1/bool.lh index edc96e1..eb6aec4 100644 --- a/test/db1/bool.lh +++ b/test/db1/bool.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" diff --git a/test/db1/dbase.lcs b/test/db1/dbase.lcs index c020e9d..56ae03b 100644 --- a/test/db1/dbase.lcs +++ b/test/db1/dbase.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db1/dbase.lh b/test/db1/dbase.lh index 463929c..d6d7c5b 100644 --- a/test/db1/dbase.lh +++ b/test/db1/dbase.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include # include "bool.h" diff --git a/test/db1/employee.lcs b/test/db1/employee.lcs index 1004239..cff6ffc 100644 --- a/test/db1/employee.lcs +++ b/test/db1/employee.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db1/employee.lh b/test/db1/employee.lh index 9d4e573..054bf3f 100644 --- a/test/db1/employee.lh +++ b/test/db1/employee.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "bool.h" diff --git a/test/db1/empset.lcs b/test/db1/empset.lcs index 6bd2eb9..eacc7e3 100644 --- a/test/db1/empset.lcs +++ b/test/db1/empset.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db1/empset.lh b/test/db1/empset.lh index 2eb4bfe..5569fad 100644 --- a/test/db1/empset.lh +++ b/test/db1/empset.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "employee.h" diff --git a/test/db1/erc.lcs b/test/db1/erc.lcs index 1ffc2e8..0915601 100644 --- a/test/db1/erc.lcs +++ b/test/db1/erc.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db1/erc.lh b/test/db1/erc.lh index 61716fe..f6def70 100644 --- a/test/db1/erc.lh +++ b/test/db1/erc.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "eref.h" diff --git a/test/db1/eref.lcs b/test/db1/eref.lcs index 2b8f653..bc28379 100644 --- a/test/db1/eref.lcs +++ b/test/db1/eref.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db1/eref.lh b/test/db1/eref.lh index fbbb433..95fec4a 100644 --- a/test/db1/eref.lh +++ b/test/db1/eref.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "employee.h" diff --git a/test/db1/ereftab.lcs b/test/db1/ereftab.lcs index f25c162..1157837 100644 --- a/test/db1/ereftab.lcs +++ b/test/db1/ereftab.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db1/ereftab.lh b/test/db1/ereftab.lh index d89a7f9..b9d0b65 100644 --- a/test/db1/ereftab.lh +++ b/test/db1/ereftab.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "employee.h" diff --git a/test/db2/dbase.lcs b/test/db2/dbase.lcs index 9eed111..9bd42d5 100644 --- a/test/db2/dbase.lcs +++ b/test/db2/dbase.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db2/dbase.lh b/test/db2/dbase.lh index 463929c..d6d7c5b 100644 --- a/test/db2/dbase.lh +++ b/test/db2/dbase.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include # include "bool.h" diff --git a/test/db2/employee.lcs b/test/db2/employee.lcs index cd75b5c..7d1102d 100644 --- a/test/db2/employee.lcs +++ b/test/db2/employee.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db2/employee.lh b/test/db2/employee.lh index 5122809..2cdd751 100644 --- a/test/db2/employee.lh +++ b/test/db2/employee.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include # include "bool.h" diff --git a/test/db2/empset.lcs b/test/db2/empset.lcs index 72740fd..f51c472 100644 --- a/test/db2/empset.lcs +++ b/test/db2/empset.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db2/empset.lh b/test/db2/empset.lh index 42c501f..9e80384 100644 --- a/test/db2/empset.lh +++ b/test/db2/empset.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "employee.h" diff --git a/test/db2/erc.lcs b/test/db2/erc.lcs index ca90e1b..6c5f4ef 100644 --- a/test/db2/erc.lcs +++ b/test/db2/erc.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db2/erc.lh b/test/db2/erc.lh index d0182bb..a77f914 100644 --- a/test/db2/erc.lh +++ b/test/db2/erc.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "eref.h" diff --git a/test/db2/eref.lcs b/test/db2/eref.lcs index adb51c2..836de9e 100644 --- a/test/db2/eref.lcs +++ b/test/db2/eref.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db2/eref.lh b/test/db2/eref.lh index fbbb433..95fec4a 100644 --- a/test/db2/eref.lh +++ b/test/db2/eref.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "employee.h" diff --git a/test/db2/ereftab.lcs b/test/db2/ereftab.lcs index 7989f3d..7d6ab02 100644 --- a/test/db2/ereftab.lcs +++ b/test/db2/ereftab.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db2/ereftab.lh b/test/db2/ereftab.lh index d89a7f9..b9d0b65 100644 --- a/test/db2/ereftab.lh +++ b/test/db2/ereftab.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "employee.h" diff --git a/test/db3/bool.lcs b/test/db3/bool.lcs index d1189fc..5fba5c2 100644 --- a/test/db3/bool.lcs +++ b/test/db3/bool.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db3/bool.lh b/test/db3/bool.lh index 9912f6c..8c95711 100644 --- a/test/db3/bool.lh +++ b/test/db3/bool.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" diff --git a/test/db3/check.lcs b/test/db3/check.lcs index 4d33628..e5e26a7 100644 --- a/test/db3/check.lcs +++ b/test/db3/check.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db3/check.lh b/test/db3/check.lh index 5562f76..74f9521 100644 --- a/test/db3/check.lh +++ b/test/db3/check.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "bool.h" diff --git a/test/db3/dbase.lcs b/test/db3/dbase.lcs index 3deebc3..57bf859 100644 --- a/test/db3/dbase.lcs +++ b/test/db3/dbase.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db3/dbase.lh b/test/db3/dbase.lh index 3f8de16..90b4a46 100644 --- a/test/db3/dbase.lh +++ b/test/db3/dbase.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include # include "bool.h" diff --git a/test/db3/employee.lcs b/test/db3/employee.lcs index 19dc978..d977fe3 100644 --- a/test/db3/employee.lcs +++ b/test/db3/employee.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db3/employee.lh b/test/db3/employee.lh index fdb1ec9..fb975b9 100644 --- a/test/db3/employee.lh +++ b/test/db3/employee.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include # include "bool.h" diff --git a/test/db3/empset.lcs b/test/db3/empset.lcs index 2627697..aa853fd 100644 --- a/test/db3/empset.lcs +++ b/test/db3/empset.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db3/empset.lh b/test/db3/empset.lh index 73ce487..6f983f5 100644 --- a/test/db3/empset.lh +++ b/test/db3/empset.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "employee.h" diff --git a/test/db3/erc.lcs b/test/db3/erc.lcs index 835dcb8..06b6185 100644 --- a/test/db3/erc.lcs +++ b/test/db3/erc.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db3/erc.lh b/test/db3/erc.lh index fe1b3ce..e53a690 100644 --- a/test/db3/erc.lh +++ b/test/db3/erc.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "eref.h" diff --git a/test/db3/eref.lcs b/test/db3/eref.lcs index c345da9..a0fbc06 100644 --- a/test/db3/eref.lcs +++ b/test/db3/eref.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db3/eref.lh b/test/db3/eref.lh index c379149..227438a 100644 --- a/test/db3/eref.lh +++ b/test/db3/eref.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "employee.h" diff --git a/test/db3/ereftab.lcs b/test/db3/ereftab.lcs index 1539ab6..ef98ae2 100644 --- a/test/db3/ereftab.lcs +++ b/test/db3/ereftab.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/db3/ereftab.lh b/test/db3/ereftab.lh index dcce794..70e7be9 100644 --- a/test/db3/ereftab.lh +++ b/test/db3/ereftab.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" # include "employee.h" diff --git a/test/decl2.lcs b/test/decl2.lcs index 6cf4f06..66bdab7 100644 --- a/test/decl2.lcs +++ b/test/decl2.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/enum.lcs b/test/enum.lcs index e56e45f..760190a 100644 --- a/test/enum.lcs +++ b/test/enum.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/glob.lcs b/test/glob.lcs index add3dd9..388e5f9 100644 --- a/test/glob.lcs +++ b/test/glob.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/impabstract.lcs b/test/impabstract.lcs index ed45dee..44aafb6 100644 --- a/test/impabstract.lcs +++ b/test/impabstract.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/iter.lcs b/test/iter.lcs index 8b13491..0642440 100644 --- a/test/iter.lcs +++ b/test/iter.lcs @@ -1,4 +1,4 @@ -%FAILED Output from LCLint 3.0.0.16 +%FAILED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/macros.lcs b/test/macros.lcs index dbe8e85..8a7e3a8 100644 --- a/test/macros.lcs +++ b/test/macros.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/macrosef.lcs b/test/macrosef.lcs index 575906d..90ef275 100644 --- a/test/macrosef.lcs +++ b/test/macrosef.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/modtest.lcs b/test/modtest.lcs index a98b318..e1bfcac 100644 --- a/test/modtest.lcs +++ b/test/modtest.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/mut.lcs b/test/mut.lcs index c800e6d..845e2a2 100644 --- a/test/mut.lcs +++ b/test/mut.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/mut.lh b/test/mut.lh index 5993039..ee8f89b 100644 --- a/test/mut.lh +++ b/test/mut.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" diff --git a/test/null6.lcd b/test/null6.lcd index 6df29e1..0dcf1b6 100644 --- a/test/null6.lcd +++ b/test/null6.lcd @@ -1,5 +1,5 @@ ;;LCLint Dump: null6.lcd -;;LCLint 3.0.0.16 --- 10 September 2001 +;;LCLint 3.0.0.17 --- 25 September 2001 ;;lib:168 ;;ctTable 0 u-2 19 38 diff --git a/test/null6.lcs b/test/null6.lcs index 73a1ff8..b2fd285 100644 --- a/test/null6.lcs +++ b/test/null6.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/observer.lcs b/test/observer.lcs index 3be672c..e17bbb2 100644 --- a/test/observer.lcs +++ b/test/observer.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/oldstyle.lcs b/test/oldstyle.lcs index 193c76f..6d387c3 100644 --- a/test/oldstyle.lcs +++ b/test/oldstyle.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/outglob.lcs b/test/outglob.lcs index a54609d..70455d4 100644 --- a/test/outglob.lcs +++ b/test/outglob.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/outparam.lcs b/test/outparam.lcs index 2d4d5cd..49cb4e0 100644 --- a/test/outparam.lcs +++ b/test/outparam.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/repexpose.lcs b/test/repexpose.lcs index 51b4d44..8ac898f 100644 --- a/test/repexpose.lcs +++ b/test/repexpose.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/repexpose.lh b/test/repexpose.lh index 0cd8913..a73cd6c 100644 --- a/test/repexpose.lh +++ b/test/repexpose.lh @@ -1,4 +1,4 @@ -/* Output from LCLint 3.0.0.16 */ +/* Output from LCLint 3.0.0.17 */ # include "bool.h" diff --git a/test/special.lcs b/test/special.lcs index ea7185f..e986ce7 100644 --- a/test/special.lcs +++ b/test/special.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/tests2.2.expect b/test/tests2.2.expect index 5189b4c..49ce385 100644 --- a/test/tests2.2.expect +++ b/test/tests2.2.expect @@ -47,7 +47,6 @@ Finished LCLint checking --- no code errors found extension.c:2:18: Parse Error: New function scope inside function. (For help on parse errors, see lclint -help parseerrors.) *** Cannot continue. -Unclosed file at exit: /tmp/cl89AAA.c Finished LCLint checking --- no code errors found diff --git a/test/tests2.2.out b/test/tests2.2.out new file mode 100644 index 0000000..49ce385 --- /dev/null +++ b/test/tests2.2.out @@ -0,0 +1,84 @@ + +boolops.c: (in function main) +boolops.c:12:3: Assignment of int to Kzam: b = 12 + +Finished LCLint checking --- 1 code error found, as expected + +mbool.h:1:17: Type implemented as macro: bool + +Finished LCLint checking --- 1 code error found, as expected + +boolenum.c: (in function main) +boolenum.c:11:8: Use of == with BOOLEAN variables (risks inconsistency because + of multiple true values): a == TRUE + +Finished LCLint checking --- 1 code error found, as expected + +break.c: (in function f) +break.c:9:4: Dereference of possibly null pointer x: *x + break.c:1:24: Storage x may become null + +Finished LCLint checking --- 1 code error found, as expected + +bstring.c:4:14: Initial value of s4[0] is type char *, expects char: "hullo" +bstring.c:4:23: Initial value of s4[1] is type char *, expects char: "g'bye" + +Finished LCLint checking --- 2 code errors found, as expected + +decl.c:3:21: Structure struct tm declared with fields { int x; }, specified + with fields { int tm_sec; int tm_min; int tm_hour;, ... } + load file ansi.lcd:961:1: Specification of struct tm + decl.c:3:17: Field tm_sec in specified corresponds to x in declaration + load file ansi.lcd:637:1: Specification of tm_sec + +Finished LCLint checking --- 1 code error found, as expected + +enumbool.c:1:34: Member of boolean enumerated type definition does not match + name set to represent TRUE or FALSE: false +enumbool.c:1:34: Member of boolean enumerated type definition does not match + name set to represent TRUE or FALSE: true + +Finished LCLint checking --- 2 code errors found, as expected + +Finished LCLint checking --- no code errors found + +Finished LCLint checking --- no code errors found + +extension.c:2:18: Parse Error: New function scope inside function. (For help on + parse errors, see lclint -help parseerrors.) +*** Cannot continue. + +Finished LCLint checking --- no code errors found + +nestext.c: (in function f) +nestext.c:3:26: Declaration using extern inside function scope: int test(void) + +Finished LCLint checking --- 1 code error found, as expected + +sizeofarray.c:1:12: Function parameter x declared as manifest array (size + constant is meaningless) +sizeofarray.c: (in function f) +sizeofarray.c:5:13: Parameter to sizeof is an array-type function parameter: + sizeof((x)) +sizeofarray.c:10:16: Return value type size_t does not match declared type int: + sizeof((a)) + +Finished LCLint checking --- 3 code errors found, as expected + +rex.c: (in function main) +rex.c:19:12: Only storage re.parent (type struct rx_hash *) derived from + variable declared in this scope is not released (memory leak) +rex.c:19:12: Only storage *(re.children)->parent (type struct rx_hash *) + derived from variable declared in this scope is not released (memory leak) +rex.c:19:12: Only storage *(*(re.children)->children)->parent (type struct + rx_hash *) derived from variable declared in this scope is not released + (memory leak) +rex.c:19:12: Only storage *(*(*(re.children)->children)->children)->parent + (type struct rx_hash *) derived from variable declared in this scope is not + released (memory leak) + +Finished LCLint checking --- 4 code errors found, as expected + +struct.c:13:6: Function main declared to return void, should return int + +Finished LCLint checking --- 1 code error found, as expected diff --git a/test/tests2.2/bool.lcs b/test/tests2.2/bool.lcs index 13bd14c..186274f 100644 --- a/test/tests2.2/bool.lcs +++ b/test/tests2.2/bool.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/tests2.4/subdir/main.lcs b/test/tests2.4/subdir/main.lcs index 7342a92..275cce2 100644 --- a/test/tests2.4/subdir/main.lcs +++ b/test/tests2.4/subdir/main.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/tests2.5/newlint.lcd b/test/tests2.5/newlint.lcd index b7499b7..34e1a04 100644 --- a/test/tests2.5/newlint.lcd +++ b/test/tests2.5/newlint.lcd @@ -1,5 +1,5 @@ ;;LCLint Dump: newlint.lcd -;;LCLint 3.0.0.16 --- 10 September 2001 +;;LCLint 3.0.0.17 --- 25 September 2001 ;;lib:168 ;;ctTable 0 u-2 19 38 diff --git a/test/tq.lcs b/test/tq.lcs index a36e194..9550452 100644 --- a/test/tq.lcs +++ b/test/tq.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil diff --git a/test/ud2.lcs b/test/ud2.lcs index 271bd8e..aba573c 100644 --- a/test/ud2.lcs +++ b/test/ud2.lcs @@ -1,4 +1,4 @@ -%PASSED Output from LCLint 3.0.0.16 +%PASSED Output from LCLint 3.0.0.17 %LCLimports %LCLSortTable %LCLsort bool immutable nil nil -- 2.45.2