-# Generated automatically from Makefile.in by configure.
+##################################################
+###
+### Makefile for LCLint
+###
+### designed for use with gmake (GNU make)
+###
+### original version based on LCL Makefile
+### completely revised December 1993
+### revised for 1.4a, November 1994
+### revised for 2.0, February 1996
+### revised for 2.2, August 1996
+###
+### This file should not need to be edited.
###
-### Makefile for building and installing LCLint 2.5
+### Compilers and tools set using the top-level Makefile override settings
+### in this file when make is run from the top directory.
###
-### Updated for LCLint 2.5: 23 May 2000
-### Updated for LCLint 2.4: 12 April 1998
-### Updated for LCLint 2.2: 25 August 1996
-### Updated for LCLint 2.1a: 17 April 1996
-### Updated for LCLint 2.0: 24 February 1996
-### Updated for LCLint 1.4: 29 January 1995
-### Original for LCLint 1.0: 20 February 1994
+### Commands:
###
-
-###
-### This makefile assumes the gnu version of make is available.
-###
-### Run: make to build LCLint.
-### make install to install.
+### make all
+### builds a release version of lclint from scratch using optimizations
###
+### make quick
+### builds a local version of lclint (no optimizations)
+### (does not remake files)
###
-### These constants will be compiled into the lclint binary.
+### make test
+### runs the test suite
+### (must have installed test suite from lclint.test.tar.Z)
###
-### They may be overridden by environment variables, but these
-### constants set the default values when no environment variables
-### are set.
-###
-
-### Command to run C preprocessor:
-DEFAULT_CPPCMD = gcc -E
-
-### Directory containing system include files:
-
-SYSTEM_LIBDIR = "/usr/include"
+.SUFFIXES : .h .c .o .l .check
+.PHONY : all dorerelease retest rerelease homeversion
+.IGNORE : dorerelease retest rerelease
###
-### Select installation directories:
+### system information (compilers, flags, directories, etc.)
###
-### The LIBDIR and IMPORTSDIR are compiled into the binary to
-### select the default LARCH_PATH and LCLIMPORTDIR, which can
-### also be overridden by environment variables.
-###
-
-### directory for lclint libraries
-LIBDIR = /a/apollo/af9/drl7x/re/LCLintDev/lib
-
-### directory for lclint standard imports
-IMPORTSDIR = /a/apollo/af9/drl7x/re/LCLintDev/imports
-### directory for lclint binary
-INSTALLDIR = /a/apollo/af9/drl7x/re/LCLintDev/bin
+include Makefile.sys
-### this should be the complete path for the directory where this
-### Makefile is, with no trailing / or spaces.
-
-BASEDIR = /a/apollo/af9/drl7x/re/LCLintDev
-
-###
-### Then, run:
-###
-### make
-###
-### I recommend doing this in an emacs shell (or buffered terminal) so
-### you can scroll through the output.
-###
-### This should (hopefully) work on most systems without further changes.
-###
-### If you do not have gcc, set CC = cc (or some other compiler)
-### later in this file.
-###
-### It should:
-### o build lclint
-### o put lclint in BASEDIR/bin/lclint
-###
-### If you have installed the test suite, then do:
###
-### make test
-###
-### to verify lclint.
+### check files before compiling
+### (can't be 1 unless you have lclint already!)
###
+CHECK = 0 ### set to 1
+
###
-### shell --- should work with /bin/sh or similar shells too.
+### source files
###
-SHELL = /bin/csh
+include Makefile.sources
###
-### If you wish to install lclint in some other directory, set these
-### variables, and do
-###
-### make install
-###
+### top level
+###
-### installation command
-INSTALL = cp
-INSTALLFLAGS =
+all : dorelease
-### this works with nfs, change to whatever is needed to make
-### a file executable on your system
+quick: lclint
-MAKEEXE = chmod 755
+lclint : $(OBJ)
+ @echo '// '
+ @echo '// Linking:'
+ @echo '// '
+ $(CC) -o lclint $(OBJ) $(LINKFLAGS)
+
+object: $(OBJ)
+mylint:
+ CC="$(LCLINT)" ; export CC ; $(MAKE) -e object
###
-### end of installation variables
+### grammars
###
###
-### compiler --- gcc is recommended, but lclint has been compiled
-### without changes using cc on several platforms.
+### -p xx flag to bison renames yyparse ==> xxparse, xxlex ==> xxlex
+### this is probably NOT compatible with yacc.
###
-CC = /opt/GCC281/bin/gcc -DSTDC_HEADERS=1 -g -Wall
+signature.c : signature.c.der signature.y
+ifdef BISON
+ @$(BISON) $(YFLAGS) -p lsl signature.y
+ @$(CAT) bison.head signature.tab.c > signature.c
+ @$(MV) Headers/signature_gen.h Headers/signature_gen.bak
+ @$(CAT) bison.head signature.tab.h > Headers/signature_gen.h
+else
+ $(CP) signature.c.der signature.c
+endif
+
+cgrammar.c : cgrammar.c.der cgrammar.y
+ifdef BISON
+ $(BISON) $(YFLAGS) cgrammar.y
+ @echo '// Expect 119 shift/reduce conflicts and 114 reduce/reduce conflicts.'
+ @echo '// (see cgrammar.y for explanation)'
+ @$(CAT) bison.head cgrammar.tab.c > cgrammar.c
+ @$(MV) Headers/cgrammar_tokens.h Headers/cgrammar_tokens.bak
+ @$(CAT) bison.head cgrammar.tab.h > Headers/cgrammar_tokens.h
+else
+ $(CP) cgrammar.c.der cgrammar.c
+endif
+
+### llgrammar2.h is necessary so +singleinclude may be used
+
+llgrammar.c : llgrammar.c.der llgrammar.y
+ifdef BISON
+ $(BISON) $(YFLAGS) -p yl llgrammar.y
+ @echo '// Expect 2 shift/reduce conflicts.'
+ @$(CAT) bison.head llgrammar.tab.c > llgrammar.c
+ @$(MV) Headers/llgrammar_gen2.h Headers/llgrammar_gen2.bak
+ @$(CAT) bison.head llgrammar.tab.h > Headers/llgrammar_gen2.h
+ @$(MV) Headers/llgrammar_gen.h Headers/llgrammar_gen.bak
+ @$(CAT) bison.head llgrammar.tab.h > Headers/llgrammar_gen.h
+else
+ $(CP) llgrammar.c.der llgrammar.c
+endif
+
+cscanner.c : cscanner.c.der cscanner.l
+ifdef FLEX
+ $(FLEX) $(LFLAGS) cscanner.l
+ $(CAT) flex.head lex.yy.c > cscanner.c
+else
+ $(CP) cscanner.c.der cscanner.c
+endif
###
-### optimizing compiler --- add optimization flags here
+### compile without warnings
###
-CCOPT = $(CC)
+signature.o : signature.c
+ $(CC) $(CPPFLAGS) -c $*.c
-###
-### link flags --- this links the lex or flex library
-###
+cgrammar.o : cgrammar.c
+ $(CC) $(CPPFLAGS) -c $*.c
+
+llgrammar.o : llgrammar.c
+ $(CC) $(CPPFLAGS) -c $*.c
-LINKFLAGS = -ll
+cscanner.o : cscanner.c
+ $(CC) $(CPPFLAGS) -c $*.c
###
-### do you have bison and/or flex?
-### (Note: yacc will probably not work; lex might work but is not recommended.)
+### header files dependant on grammars
###
-BISON = /gnu/bin//bison
-FLEX = /gnu/bin//flex
+Headers/signature2.h : signature.c
+Headers/cgrammar2.h : cgrammar.c
+Headers/llgrammar.h : llgrammar.c
###
-### is the test suite available? (must be full path here)
+### defaults
###
-TESTDIR = $(BASEDIR)/test
+### Flags for checking a single file
+SINGLEFLAGS = +neverinclude -supcounts +partial -showsummary -load lclint.lcd
-###
-### if this Makefile is used with one of the
-### standard installation packages, no changes should be
-### necessary below this line.
-###
+.c.check: lclint.lcd lclint
+ $(LCLINT) $(LINTFLAGS) $(SINGLEFLAGS) $*.c
-.PHONY: install dobinaries dolibraries doimports test
+.c.o:
+ifeq ($(CHECK), 1)
+ $(LCLINT) $(LINTFLAGS) $(SINGLEFLAGS) $*.c
+endif
+ @echo '// Compiling '$*.c' / compiled: '`$(OFILES)`' (of 120 files)'
+ @$(CC) $(CFLAGS) -c $*.c
###
-### set this to a different directory
-### to install binaries elsewhere
+### alternatives (tests, releases, backups, etc.)
###
-RELEASEDIR = $(BASEDIR)/bin
+### -e option makes environment variables take precedence
-all: bin/lclint
-lclint: bin/lclint
+.PHONY : test quicktest opt up
-bin/lclint:
- @echo 'Building lclint from source'
-ifeq ($(SHELL), /bin/csh)
- cd src ; setenv CC '$(CC)' ; setenv CCOPT '$(CCOPT)'; \
- setenv BISON '$(BISON)' ; setenv FLEX '$(FLEX)' ; \
- setenv DEFAULT_CPPCMD '"$(DEFAULT_CPPCMD)"' ; \
- setenv SYSTEM_LIBDIR '$(SYSTEM_LIBDIR)' ; \
- setenv LINKFLAGS '$(LINKFLAGS)' ; \
- setenv DEFAULT_LARCHPATH '".:$(LIBDIR)"' ; \
- setenv DEFAULT_LCLIMPORTDIR '"$(IMPORTSDIR)"' ; \
- $(MAKE) -e
+opt :
+ifneq (,$(findstring csh, $(SHELL)))
+ setenv CC '$(CCOPT)' ; $(MAKE) -e lclint
else
- cd src ; CC='$(CC)'; export CC; CCOPT='$(CCOPT)'; \
- BISON='$(BISON)' ; export BISON; FLEX='$(FLEX)'; export FLEX; \
- DEFAULT_CPPCMD='$(DEFAULT_CPPCMD)' ; export DEFAULT_CPPCMD ;\
- SYSTEM_LIBDIR='$(SYSTEM_LIBDIR)' ; export SYSTEM_LIBDIR ;\
- DEFAULT_LARCHPATH='".:$(LIBDIR)/"' ; export DEFAULT_LARCHPATH ;\
- LINKFLAGS='$(LINKFLAGS)'; export LINK_FLAGS; \
- DEFAULT_LCLIMPORTDIR='"$(IMPORTSDIR)"' ; export DEFAULT_LCLIMPORTDIR ;\
- $(MAKE) -e
+ CC="$(CCOPT)" ; export CC ; $(MAKE) -e lclint
endif
+
+updateversion:
+ @$(MV) Headers/herald.h Headers/herald.last
+ @echo '/* herald.h - created automatically by gmake updateversion */' > Headers/herald.h
+ @echo '/*@constant observer char *LCL_VERSION;@*/' >> Headers/herald.h
+ @echo '# define LCL_VERSION "LCLint '`cat $(VERSION_NUMBER)`' --- '`cat DATE`'"' \
+ >> Headers/herald.h
+ @echo '/*@constant observer char *LCL_PARSE_VERSION;@*/' >> Headers/herald.h
+ @echo '# define LCL_PARSE_VERSION "LCLint '`cat $(VERSION_NUMBER)`'"' \
+ >> Headers/herald.h
+ @echo '/*@constant observer char *LCL_COMPILE;@*/' >> Headers/herald.h
+ @echo '# define LCL_COMPILE "Compiled using '$(CC)' on '`uname -a`' by '`whoami`'"' >> Headers/herald.h
+
+localconstants:
+ @$(MV) Headers/local_constants.h Headers/local_constants.last
+ @echo '/* local_constants.h - created automatically by gmake localconstants */' \
+ > Headers/local_constants.h
+ifndef SYSTEM_LIBDIR
+ @echo '*** Fatal Error: SYSTEM_LIBDIR not defined.'
+else
+ @echo '/*@constant observer char *SYSTEM_LIBDIR;@*/' >> Headers/local_constants.h
+ @echo '# define SYSTEM_LIBDIR $(SYSTEM_LIBDIR)' >> Headers/local_constants.h
+ifndef DEFAULT_LARCHPATH
+ @echo '*** Fatal Error: DEFAULT_LARCHPATH not defined.'
+else
+ @echo '/*@constant observer char *DEFAULT_LARCHPATH;@*/' >> Headers/local_constants.h
+ @echo '# define DEFAULT_LARCHPATH $(DEFAULT_LARCHPATH)' >> Headers/local_constants.h
+ifndef DEFAULT_LCLIMPORTDIR
+ @echo '*** Fatal Error: DEFAULT_LARCHPATH not defined.'
+else
+ @echo '/*@constant observer char *DEFAULT_LCLIMPORTDIR;@*/' >> Headers/local_constants.h
+ @echo '# define DEFAULT_LCLIMPORTDIR $(DEFAULT_LCLIMPORTDIR)' >> Headers/local_constants.h
+endif
+endif
+endif
+
+dorelease:
@echo '// '
- @echo '// Run: '$(MAKE)' test to check'
+ @echo '// Making LCLint'
+ @echo '// Version '`cat $(VERSION_NUMBER)`
@echo '// '
- mv src/lclint bin/lclint
-
-test:
-ifeq ($(SHELL), /bin/csh)
- cd $(TESTDIR) ; setenv LCLINT $(RELEASEDIR)/lclint ; $(MAKE) -e
+ @echo '// Compiler: '$(CCOPT)
+ifdef BISON
+ @echo '// Bison: '$(BISON)
else
- cd $(TESTDIR) ; LCLINT=$(RELEASEDIR)/lclint ; export LCLINT ; $(MAKE) -e
+ @echo '// Use derived bison files'
endif
+ifdef FLEX
+ @echo '// Flex: '$(FLEX)
+else
+ @echo '// Use derived flex files'
+endif
+ @echo '// Default cpp command: '$(DEFAULT_CPPCMD)
+ @echo '// System include directory: '$(SYSTEM_LIBDIR)
+ @echo '// Default Larch path: '$(DEFAULT_LARCHPATH)
+ @echo '// Default imports directory: '$(DEFAULT_LCLIMPORTDIR)
+ @echo '// '
+ @echo 'Making tags'
+ ./maketags
+ @echo '// '
+ @echo '// Updating version information'
+ @$(MAKE) -e updateversion
+ @echo '// Updating local constants'
+### @$(MAKE) -e localconstants
+ @echo '// '
+ @echo '// Compiling:'
+ @echo '// '
+ @$(MAKE) -e opt
+ @echo '// Done Release '`cat $(VERSION_NUMBER)`
+
-clean:
- cd src; $(MAKE) clean
- rm bin/lclint
+flags: flags.def
+ grep "FLG_" flags.def > Headers/flag_codes.gen
###
-### locations of standard LCLint files
+### cleaning
+###
+### Standard entries to remove files from the directories
+### up --- remove .o files and grammar derivatives
+### tidy --- eliminate unwanted files
+### clean --- delete derived files, except for spec-derived files
+### pristine --- delete all derived files
###
-### this should NOT have to be edited if you use the standard
-### installation package
-
-CP = cp
-LCLINTBINDIR = $(BASEDIR)/bin
-LCLINTBIN = lclint
+.PHONY .IGNORE : up tidy clean pristine
-LCLINTLIB = $(BASEDIR)/lib
-LCLINTIMPORTS = $(BASEDIR)/imports
+pristine: clean
+ -$(RM) -f *.lcs *.lslo
-###
-### uses recursive make calls directly, so installation
-### will continue even if there are errors!
-###
+clean: tidy
+ -$(RM) core lclint
+ -$(RM) *.out *.output *.bib *.dvi *.idx *.log *.o *.toc
+ -$(RM) cgrammar.c cscanner.c
+ -$(RM) test* Headers/*~ Headers/#*
-install:
- @echo '// '
- @echo '// Doing lclint installation'
- @echo '// '
- @echo ' '
- -@$(MAKE) dobinaries
- @echo ' '
- -@$(MAKE) dolibraries
- @echo ' '
- -@$(MAKE) doimports
- @echo ' '
- @echo '// Installation complete.'
+tidy:
+ -$(RM) ,* .,* *.CKP *.BAK .emacs_[0-9]* core a.out *.*~
-dobinaries:
- @echo '// Installing binaries in '$(INSTALLDIR)
- cd $(LCLINTBINDIR); $(INSTALL) $(INSTALLFLAGS) lclint $(INSTALLDIR)
- @echo '// Installed: lclint in '$(INSTALLDIR)
+up:
+ -$(RM) cgrammar.c llgrammar.c signature.c cscanner.c
+ -$(RM) *.o
-dolibraries:
- @echo '// Installing libraries in '$(LIBDIR)
- @echo " (This will complain if the directory already exists, don't worry about it.)"
- -mkdir $(LIBDIR)
- $(CP) $(LCLINTLIB)/* $(LIBDIR)
- @echo '// Installed libraries.'
+###
+### dependancies
+###
-doimports:
- @echo '// Installing imports in '$(IMPORTSDIR)
- @echo " (This will complain if the directory already exists, don't worry about it.)"
- -mkdir $(IMPORTSDIR)
- $(CP) $(LCLINTIMPORTS)/* $(IMPORTSDIR)
- @echo '// Installed imports.'
+depend:
+ $(MAKEDEPEND) $(CINCLUDES) $(CFLAGS) -f Makefile.depend $(SRC) $(GRAMS)
+###
+### analysing dependancies takes a long time and doesn't work terribly
+### well, so the are NOT included here. NOTE carefully, this means if a
+### header file is changed manual recompilation may be necessary.
+###
+### include Makefile.depend
+###
+### LCLint checking
+###
+###
+### A library is used for the specifications
+###
+$(CHECKS): lclint.lcd
+###
+### other flags are in .lclintrc file
+###
+lint:
+ $(LCLINT) -f lclint.lclintrc $(CPPFLAGS) +singleinclude -mustfree -namechecks -abstract -boolops -protoparammatch $(ALLSRC) -dump lclint
-
-< reading spec bool.lcl >
-< reading spec employee.lcl >
-< reading spec eref.lcl >
-< reading spec empset.lcl >
-< reading spec ereftab.lcl >
-< reading spec erc.lcl >
-< reading spec dbase.lcl >
-< preprocessing >
-< checking employee.c >
-employee.c: (in function employee_equal)
-employee.c:24: Function strncmp expects arg 3 to be size_t gets int:
- maxEmployeeName
-< checking eref.c >
-< checking empset.c >
-empset.c: (in function empset_insert)
-empset.c:28: Variable er declared but not used
-empset.c: (in function empset_disjointUnion)
-empset.c:85: Undocumented modification of s1 possible from call to
- erc_iterStart (through alias s2): erc_iterStart(s2)
-empset.c:85: Undocumented modification of s2 possible from call to
- erc_iterStart: erc_iterStart(s2)
-empset.c: (in function empset_union)
-empset.c:108: Undocumented modification of s2 possible from call to
- erc_iterStart (through alias s1): erc_iterStart(s1)
-empset.c:108: Undocumented modification of s1 possible from call to
- erc_iterStart: erc_iterStart(s1)
-empset.c: (in function empset_subset)
-empset.c:139: Undocumented modification of s1 possible from call to
- erc_iterStart: erc_iterStart(s1)
-empset.c:135: Variable e declared but not used
-< checking ereftab.c >
-ereftab.c: (in function ereftab_lookup)
-ereftab.c:34: Undocumented modification of t possible from call to
- erc_iterStart: erc_iterStart(t)
-< checking erc.c >
-erc.c: (in function erc_member)
-erc.c:47: Operands of == are abstract type (eref): tmpc->val == er
-erc.c: (in function erc_delete)
-erc.c:78: Operands of == are abstract type (eref): elem->val == er
-erc.c: (in function erc_sprint)
-erc.c:141: Function malloc expects arg 1 to be size_t gets int:
- erc_size(c) * (employeePrintSize + 1) + 1
-erc.c:151: Undocumented modification of c possible from call to erc_iterStart:
- erc_iterStart(c)
-< checking dbase.c >
-dbase.c: (in function query)
-dbase.c:210: Variable er declared but not used
-dbase.c:211: Variable e declared but not used
-< checking drive.c >
-drive.c: (in function main)
-drive.c:123: Return value (type db_status) ignored: hire(e)
-< checking macros bool.h >
-< global checks >
-< cleaning .......... >
-
-Finished LCLint checking --- 16 code errors found, as expected
-
-< reading spec bool.lcl >
-< reading spec employee.lcl >
-< reading spec eref.lcl >
-< reading spec empset.lcl >
-< reading spec ereftab.lcl >
-< reading spec erc.lcl >
-< reading spec dbase.lcl >
-< preprocessing >
-employee.h:2: Name EMPLOYEE_H is reserved for future ANSI library extensions.
- Macros beginning with E and a digit or uppercase letter may be added to
- <errno.h>. (See ANSI, Section 4.13.1)
-< more preprocessing . >
-eref.h:2: Name EREF_H is reserved for future ANSI library extensions. Macros
- beginning with E and a digit or uppercase letter may be added to <errno.h>.
- (See ANSI, Section 4.13.1)
-< more preprocessing . >
-empset.h:2: Name EMPSET_H is reserved for future ANSI library extensions.
- Macros beginning with E and a digit or uppercase letter may be added to
- <errno.h>. (See ANSI, Section 4.13.1)
-< more preprocessing . >
-erc.h:2: Name ERC_H is reserved for future ANSI library extensions. Macros
- beginning with E and a digit or uppercase letter may be added to <errno.h>.
- (See ANSI, Section 4.13.1)
-< more preprocessing . >
-ereftab.h:4: Name EREFTAB_H is reserved for future ANSI library extensions.
- Macros beginning with E and a digit or uppercase letter may be added to
- <errno.h>. (See ANSI, Section 4.13.1)
-< more preprocessing . >
-< checking employee.c >
-bool.h:20: Modifies list for bool_initMod uses global internal state, not
- included in globals list.
- bool.h:20: Declaration of bool_initMod
-employee.c: (in function employee_setName)
-employee.c:11: Body of if statement is not a block: return FALSE
-employee.c:14: Parameter 1 (e->name) to function strcpy is declared unique but
- may be aliased externally by parameter 2 (na)
-employee.c: (in function employee_equal)
-employee.c:24: Function strncmp expects arg 3 to be size_t gets int:
- maxEmployeeName
-employee.c: (in function employee_sprint)
-employee.c:29: Read-only string literal storage used as initial value for
- unqualified storage: gender[0] = "male"
-employee.c:29: Read-only string literal storage used as initial value for
- unqualified storage: gender[1] = "female"
-employee.c:29: Read-only string literal storage used as initial value for
- unqualified storage: gender[2] = "?"
-employee.c:30: Read-only string literal storage used as initial value for
- unqualified storage: jobs[0] = "manager"
-employee.c:30: Read-only string literal storage used as initial value for
- unqualified storage: jobs[1] = "non-manager"
-employee.c:30: Read-only string literal storage used as initial value for
- unqualified storage: jobs[2] = "?"
-employee.c:33: Array fetch using non-integer, gender: gender[e.gen]
-employee.c:33: Array fetch using non-integer, job: jobs[e.j]
-employee.h: (in macro employee_initMod)
-employee.h:10: Called procedure bool_initMod may access internal state, but
- globals list does not include globals internalState
-employee.h:10: Undocumented modification of internal state possible from call
- to bool_initMod: bool_initMod()
-< checking eref.c >
-eref.h:9: Constant exported, but not specified: used
-eref.h:9: Constant exported, but not specified: avail
-eref.h:9: Type exported, but not specified: eref_status
-eref.h:14: Type exported, but not specified: eref_ERP
-eref.h:17: Variable exported, but not specified: eref_Pool
-eref.c: (in function eref_alloc)
-eref.c:12: Undocumented use of global eref_Pool
-eref.c:12: Undocumented use of global eref_Pool
-eref.c:12: Body of for statement is empty
-eref.c:12: Undocumented use of global eref_Pool (in post loop test)
-eref.c:16: Undocumented use of global eref_Pool
-eref.c:18: Undocumented use of global eref_Pool
-eref.c:19: Undocumented use of global eref_Pool
-eref.c:20: Undocumented use of global eref_Pool
-eref.c:20: Parameter to sizeof is type employee: sizeof(employee)
-eref.c:19: Undocumented modification of *(eref_Pool.conts) possible from call
- to realloc: realloc(eref_Pool.conts, 2 * eref_Pool.size * sizeof(employee))
-eref.c:18: Undocumented modification of eref_Pool.conts:
- eref_Pool.conts = (employee *)realloc(eref_Pool.conts, 2 * eref_Pool.size *
- sizeof(employee))
-eref.c:22: Undocumented use of global eref_Pool
-eref.c:25: Argument to exit has implementation defined behavior: 1
-eref.c:28: Undocumented use of global eref_Pool
-eref.c:29: Undocumented use of global eref_Pool
-eref.c:30: Undocumented use of global eref_Pool
-eref.c:30: Parameter to sizeof is type eref_status: sizeof(eref_status)
-eref.c:29: Undocumented modification of *(eref_Pool.status) possible from call
- to realloc: realloc(eref_Pool.status, 2 * eref_Pool.size *
- sizeof(eref_status))
-eref.c:28: Undocumented modification of eref_Pool.status:
- eref_Pool.status = (eref_status *)realloc(eref_Pool.status, 2 *
- eref_Pool.size * sizeof(eref_status))
-eref.c:32: Undocumented use of global eref_Pool
-eref.c:35: Argument to exit has implementation defined behavior: 1
-eref.c:38: Undocumented use of global eref_Pool
-eref.c:38: Undocumented use of global eref_Pool
-eref.c:38: Undocumented modification of eref_Pool.size:
- eref_Pool.size = 2 * eref_Pool.size
-eref.c:40: Undocumented use of global eref_Pool
-eref.c:41: Undocumented use of global eref_Pool
-eref.c:41: Undocumented modification of eref_Pool.status[]:
- eref_Pool.status[i] = avail
-eref.c:41: Body of for statement is not a block: eref_Pool.status[i] = avail
-eref.c:41: Undocumented use of global eref_Pool (in post loop test)
-eref.c:44: Undocumented use of global eref_Pool
-eref.c:44: Undocumented modification of eref_Pool.status[]:
- eref_Pool.status[res] = used
-eref.c: (in function eref_initMod)
-eref.c:53: Undocumented use of file static needsInit
-eref.c:58: Undocumented use of file static needsInit
-eref.c:58: Undocumented modification of needsInit: needsInit = FALSE
-eref.c:60: Statement has no effect: employee_initMod()
-eref.c:62: Undocumented use of global eref_Pool
-eref.c:62: Parameter to sizeof is type employee: sizeof(employee)
-eref.c:62: Undocumented modification of eref_Pool.conts:
- eref_Pool.conts = (employee *)malloc(size * sizeof(employee))
-eref.c:62: Implicitly only storage eref_Pool.conts not released before
- assignment: eref_Pool.conts = (employee *)malloc(size * sizeof(employee))
-eref.c:64: Undocumented use of global eref_Pool
-eref.c:67: Argument to exit has implementation defined behavior: 1
-eref.c:70: Undocumented use of global eref_Pool
-eref.c:70: Parameter to sizeof is type eref_status: sizeof(eref_status)
-eref.c:70: Undocumented modification of eref_Pool.status:
- eref_Pool.status = (eref_status *)malloc(size * sizeof(eref_status))
-eref.c:70: Implicitly only storage eref_Pool.status not released before
- assignment: eref_Pool.status = (eref_status *)malloc(size *
- sizeof(eref_status))
-eref.c:72: Undocumented use of global eref_Pool
-eref.c:75: Argument to exit has implementation defined behavior: 1
-eref.c:78: Undocumented use of global eref_Pool
-eref.c:78: Undocumented modification of eref_Pool.size: eref_Pool.size = size
-eref.c:82: Undocumented use of global eref_Pool
-eref.c:82: Undocumented modification of eref_Pool.status[]:
- eref_Pool.status[i] = avail
-eref.c:84: Global storage *(eref_Pool.conts) contains 4 undefined fields when
- call returns: ssNum, salary, gen, j
-eref.c:84: Global storage eref_Pool contains 1 undefined field when call
- returns: status
-eref.h: (in macro eref_free)
-eref.h:23: Undocumented use of global eref_Pool
-eref.h:23: Undocumented modification of eref_Pool.status[]:
- eref_Pool.status[er] = avail
-eref.h: (in macro eref_assign)
-eref.h:24: Undocumented use of global eref_Pool
-eref.h:24: Macro parameter used without parentheses: e
-eref.h:24: Undocumented modification of eref_Pool.conts[]:
- eref_Pool.conts[er] = e
-eref.h: (in macro eref_get)
-eref.h:25: Undocumented use of global eref_Pool
-eref.h: (in macro eref_equal)
-eref.h:26: Macro parameter used without parentheses: er1
-eref.h:26: Macro parameter used without parentheses: er2
-< checking empset.c >
-erc.h:6: Type exported, but not specified: ercElem
-erc.h:7: Type exported, but not specified: ercList
-erc.h:8: Type exported, but not specified: ercInfo
-empset.h:10: Variable exported, but not specified: known
-empset.c:5: Name _empset_get is in the implementation name space (any
- identifier beginning with underscore)
-empset.c: (in function _empset_get)
-empset.c:11: Undocumented modification of s possible from call to
- erc_iterStart: erc_iterStart(s)
-empset.c:15: Body of if statement is not a block:
- do { { erc_iterFinal(it) } } while (FALSE)
-empset.c: (in function empset_insert)
-empset.c:30: Undetected modification possible from call to unconstrained
- function _empset_get: _empset_get
-empset.c:28: Variable er declared but not used
-empset.c: (in function empset_insertUnique)
-empset.c:43: Undocumented use of global known
-empset.c:49: Undocumented use of global known
-empset.c:49: Undocumented modification of known possible from call to
- ereftab_insert: ereftab_insert(known, e, er)
-empset.c: (in function empset_delete)
-empset.c:59: Undetected modification possible from call to unconstrained
- function _empset_get: _empset_get
-empset.c: (in function empset_disjointUnion)
-empset.c:85: Undocumented modification of s1 possible from call to
- erc_iterStart (through alias s2): erc_iterStart(s2)
-empset.c:85: Undocumented modification of s2 possible from call to
- erc_iterStart: erc_iterStart(s2)
-empset.c:86: Body of for statement is not a block:
- empset_insertUnique(result, eref_get(er))
-empset.c: (in function empset_union)
-empset.c:108: Undocumented modification of s2 possible from call to
- erc_iterStart (through alias s1): erc_iterStart(s1)
-empset.c:108: Undocumented modification of s1 possible from call to
- erc_iterStart: erc_iterStart(s1)
-empset.c:110: Body of if statement is not a block: erc_insert(result, er)
-empset.c:109: Body of for statement is not a block:
- if (!empset_member(eref_get(er), s2)) erc_insert(result, er)
-empset.c: (in function empset_intersect)
-empset.c:125: Body of if statement is not a block: erc_insert(toDelete, er)
-empset.c:124: Body of for statement is not a block:
- if (!empset_member(eref_get(er), s2)) erc_insert(toDelete, er)
-empset.c:128: Return value (type bool) ignored: erc_delete(s1, er)
-empset.c:128: Body of for statement is not a block: erc_delete(s1, er)
-empset.c: (in function empset_subset)
-empset.c:139: Undocumented modification of s1 possible from call to
- erc_iterStart: erc_iterStart(s1)
-empset.c:141: Body of if statement is not a block:
- do { { erc_iterFinal(it) } } while (FALSE)
-empset.c:140: Body of for statement is not a block:
- if (!empset_member(eref_get(er), s2)) do { { erc_iterFinal(it)
- } } while (FALSE)
-empset.c:135: Variable e declared but not used
-empset.c: (in function empset_initMod)
-empset.c:148: Undocumented use of file static initDone
-empset.c:148: Body of if statement is not a block: return
-empset.c:151: Statement has no effect: employee_initMod()
-empset.c:153: Statement has no effect: erc_initMod()
-empset.c:154: Statement has no effect: ereftab_initMod()
-empset.c:155: Undocumented use of global known
-empset.c:155: Undocumented modification of known: known = ereftab_create()
-empset.c:156: Undocumented use of file static initDone
-empset.c:156: Undocumented modification of initDone: initDone = TRUE
-empset.h: (in macro empset_member)
-empset.h:30: Undetected modification possible from call to unconstrained
- function _empset_get: _empset_get
-< checking ereftab.c >
-ereftab.c: (in function ereftab_delete)
-ereftab.c:24: Return value (type bool) ignored: erc_delete(t, er)
-ereftab.c: (in function ereftab_lookup)
-ereftab.c:34: Undocumented modification of t possible from call to
- erc_iterStart: erc_iterStart(t)
-ereftab.c:37: Body of if statement is not a block: return er
-ereftab.c: (in function ereftab_initMod)
-ereftab.c:47: Statement has no effect: erc_initMod()
-< checking erc.c >
-erc.c: (in function erc_create)
-erc.c:8: Parameter to sizeof is type ercInfo: sizeof(ercInfo)
-erc.c:13: Argument to exit has implementation defined behavior: 1
-erc.c:18: Null storage c->vals derivable from return value: c
- erc.c:16: Storage c->vals becomes null
-erc.c:18: Fresh storage returned as unqualified (should be only): c
- erc.c:8: Fresh storage c allocated
-erc.c: (in function erc_clear)
-erc.c:34: Function returns with null storage derivable from parameter c->vals
- erc.c:32: Storage c->vals becomes null
-erc.c: (in function erc_final)
-erc.c:39: Implicitly temp storage c passed as only param: free (c)
-erc.c: (in function erc_member)
-erc.c:47: Operands of == are abstract type (eref): tmpc->val == er
-erc.c:47: Body of if statement is not a block: return TRUE
-erc.c:47: Body of for statement is not a block:
- if (tmpc->val == er) return TRUE
-erc.c: (in function erc_insert)
-erc.c:55: Parameter to sizeof is type ercElem: sizeof(ercElem)
-erc.c:60: Argument to exit has implementation defined behavior: 1
-erc.c: (in function erc_delete)
-erc.c:78: Operands of == are abstract type (eref): elem->val == er
-erc.c:83: Implicitly only storage prev->next not released before assignment:
- prev->next = elem->next
-erc.c:83: Clauses exit with elem referencing implicitly only storage in true
- branch, local storage in false branch
- erc.c:81: Storage elem becomes implicitly only
-erc.c:83: Storage c->vals->next is kept in one path, but live in another.
- erc.c:83: Storage c->vals->next becomes kept
-erc.c:81: Body of if clause of if statement is not a block:
- c->vals = elem->next
-erc.c:83: Body of else clause of if statement is not a block:
- prev->next = elem->next
-erc.c:87: Released storage c->vals reachable from parameter at return point
- erc.c:85: Storage c->vals is released
-erc.c: (in function erc_iterStart)
-erc.c:98: Parameter to sizeof is type ercList: sizeof(ercList)
-erc.c:103: Argument to exit has implementation defined behavior: 1
-erc.c:107: Fresh storage returned as unqualified (should be only): result
- erc.c:98: Fresh storage result allocated
-erc.c:108: Suspect object listed in modifies of erc_iterStart not modified: c
- erc.lcl:49: Specification of erc_iterStart
-erc.c: (in function erc_yield)
-erc.c:117: Implicitly temp storage it passed as only param: free (it)
-erc.c:117: Unreachable code: free(it)
-erc.c:118: Variable it is released in true branch, but live in continuation.
- erc.c:117: Storage it is released
-erc.c:121: Only storage *it->next assigned to unqualified: *(it) = (*it)->next
-erc.c: (in function erc_join)
-erc.c:130: Body of for statement is not a block: erc_insert(c1, tmpc->val)
-erc.c: (in function erc_sprint)
-erc.c:141: Function malloc expects arg 1 to be size_t gets int:
- erc_size(c) * (employeePrintSize + 1) + 1
-erc.c:146: Argument to exit has implementation defined behavior: 1
-erc.c:151: Undocumented modification of c possible from call to erc_iterStart:
- erc_iterStart(c)
-erc.c:159: Fresh storage returned as unqualified (should be only): result
- erc.c:140: Fresh storage result allocated
-erc.h: (in macro erc_choose)
-erc.h:15: Macro parameter used without parentheses: c
-erc.h: (in macro erc_initMod)
-erc.h:16: Called procedure bool_initMod may access internal state, but globals
- list does not include globals internalState
-erc.h:16: Undocumented modification of internal state possible from call to
- bool_initMod: bool_initMod()
-erc.h:16: Statement has no effect: employee_initMod()
-erc.h: (in macro erc_iterFinal)
-erc.h:20: Implicitly temp storage it passed as only param: free (it)
-< checking dbase.c >
-dbase.c: (in function db_initMod)
-dbase.c:21: Undocumented use of global initDone
-dbase.c:27: Statement has no effect: employee_initMod()
-dbase.c:29: Statement has no effect: erc_initMod()
-dbase.c:30: Statement has no effect: empset_initMod()
-dbase.c:32: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS
-dbase.c:32: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS,
- mNON, fNON }): i <= fNON
-dbase.c:34: Undocumented use of global db
-dbase.c:34: Undocumented modification of db[]: db[i] = erc_create()
-dbase.c:32: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON })
- (in post loop test): i <= fNON
-dbase.c:37: Undocumented use of global initDone
-dbase.c:37: Undocumented modification of initDone: initDone = TRUE
-dbase.c:40: Name _db_ercKeyGet is in the implementation name space (any
- identifier beginning with underscore)
-dbase.c: (in function _db_ercKeyGet)
-dbase.c:45: Undocumented modification of c possible from call to erc_iterStart:
- erc_iterStart(c)
-dbase.c:56: Name _db_keyGet is in the implementation name space (any identifier
- beginning with underscore)
-dbase.c: (in function _db_keyGet)
-dbase.c:61: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS
-dbase.c:61: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS,
- mNON, fNON }): i <= fNON
-dbase.c:63: Undocumented use of global db
-dbase.c:63: Undetected modification possible from call to unconstrained
- function _db_ercKeyGet: _db_ercKeyGet
-dbase.c:61: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON })
- (in post loop test): i <= fNON
-dbase.c:73: Name _db_addEmpls is in the implementation name space (any
- identifier beginning with underscore)
-dbase.c: (in function _db_addEmpls)
-dbase.c:81: Undocumented modification of c possible from call to erc_iterStart:
- erc_iterStart(c)
-dbase.c:86: Undocumented modification of s possible from call to empset_insert:
- empset_insert(s, e)
-dbase.c:86: Return value (type bool) ignored: empset_insert(s, e)
-dbase.c: (in function hire)
-dbase.c:97: Body of if statement is not a block: return genderERR
-dbase.c:100: Body of if statement is not a block: return jobERR
-dbase.c:103: Body of if statement is not a block: return salERR
-dbase.c:105: Undetected modification possible from call to unconstrained
- function _db_keyGet: _db_keyGet
-dbase.c:106: Body of if statement is not a block: return duplERR
-dbase.c: (in function uncheckedHire)
-dbase.c:121: Undocumented use of global db
-dbase.c:121: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[mMGRS]
-dbase.c:121: Undocumented modification of db[] possible from call to
- erc_insert: erc_insert(db[mMGRS], er)
-dbase.c:123: Undocumented use of global db
-dbase.c:123: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[mNON]
-dbase.c:123: Undocumented modification of db[] possible from call to
- erc_insert: erc_insert(db[mNON], er)
-dbase.c:121: Body of if clause of if statement is not a block:
- erc_insert(db[mMGRS], er)
-dbase.c:123: Body of else clause of if statement is not a block:
- erc_insert(db[mNON], er)
-dbase.c:126: Undocumented use of global db
-dbase.c:126: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[fMGRS]
-dbase.c:126: Undocumented modification of db[] possible from call to
- erc_insert: erc_insert(db[fMGRS], er)
-dbase.c:128: Undocumented use of global db
-dbase.c:128: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[fNON]
-dbase.c:128: Undocumented modification of db[] possible from call to
- erc_insert: erc_insert(db[fNON], er)
-dbase.c:126: Body of if clause of if statement is not a block:
- erc_insert(db[fMGRS], er)
-dbase.c:128: Body of else clause of if statement is not a block:
- erc_insert(db[fNON], er)
-dbase.c:123: Body of if clause of if statement is not a block:
- if (e.j == MGR) erc_insert(db[mMGRS], er) else erc_insert(db[mNON], er)
-dbase.c: (in function fire)
-dbase.c:137: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS
-dbase.c:137: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS,
- mNON, fNON }): i <= fNON
-dbase.c:138: Undocumented use of global db
-dbase.c:138: Undocumented modification of db[] possible from call to
- erc_iterStart: erc_iterStart(db[i])
-dbase.c:142: Undocumented use of global db
-dbase.c:142: Undocumented modification of db[] possible from call to
- erc_delete: erc_delete(db[i], er)
-dbase.c:142: Return value (type bool) ignored: erc_delete(db[i]...
-dbase.c:139: Body of for statement is not a block:
- if (eref_get(er).ssNum == ssNum) { erc_iterFinal(it) }
-dbase.c:139: Body of for statement is not a block:
- for (er = erc_yield(it = erc_iterStart(db[i])); !eref_equal(er, erefNIL);
- er = erc_yield(it)) if (eref_get(er).ssNum == ssNum) { erc_iterFinal(it) }
-dbase.c:137: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON })
- (in post loop test): i <= fNON
-dbase.c: (in function promote)
-dbase.c:156: Undocumented use of global db
-dbase.c:156: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[mNON]
-dbase.c:156: Undetected modification possible from call to unconstrained
- function _db_ercKeyGet: _db_ercKeyGet
-dbase.c:160: Undocumented use of global db
-dbase.c:160: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[fNON]
-dbase.c:160: Undetected modification possible from call to unconstrained
- function _db_ercKeyGet: _db_ercKeyGet
-dbase.c:162: Body of if statement is not a block: return FALSE
-dbase.c:172: Undocumented use of global db
-dbase.c:172: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[mNON]
-dbase.c:172: Undocumented modification of db[] possible from call to
- erc_delete: erc_delete(db[mNON], er)
-dbase.c:172: Return value (type bool) ignored: erc_delete(db[mN...
-dbase.c:173: Undocumented use of global db
-dbase.c:173: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[mMGRS]
-dbase.c:173: Undocumented modification of db[] possible from call to
- erc_insert: erc_insert(db[mMGRS], er)
-dbase.c:177: Undocumented use of global db
-dbase.c:177: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[fNON]
-dbase.c:177: Undocumented modification of db[] possible from call to
- erc_delete: erc_delete(db[fNON], er)
-dbase.c:177: Return value (type bool) ignored: erc_delete(db[fN...
-dbase.c:178: Undocumented use of global db
-dbase.c:178: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[fMGRS]
-dbase.c:178: Undocumented modification of db[] possible from call to
- erc_insert: erc_insert(db[fMGRS], er)
-dbase.c: (in function setSalary)
-dbase.c:194: Undetected modification possible from call to unconstrained
- function _db_keyGet: _db_keyGet
-dbase.c: (in function query)
-dbase.c:226: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS
-dbase.c:226: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS,
- mNON, fNON }): i <= fNON
-dbase.c:227: Undocumented use of global db
-dbase.c:227: Undetected modification possible from call to unconstrained
- function _db_addEmpls: _db_addEmpls
-dbase.c:227: Body of for statement is not a block:
- numAdded += _db_addEmpls(db[i], l, h, s)
-dbase.c:226: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON })
- (in post loop test): i <= fNON
-dbase.c:230: Undocumented use of global db
-dbase.c:230: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[mMGRS]
-dbase.c:230: Undetected modification possible from call to unconstrained
- function _db_addEmpls: _db_addEmpls
-dbase.c:231: Undocumented use of global db
-dbase.c:231: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[fMGRS]
-dbase.c:231: Undetected modification possible from call to unconstrained
- function _db_addEmpls: _db_addEmpls
-dbase.c:234: Undocumented use of global db
-dbase.c:234: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[mNON]
-dbase.c:234: Undetected modification possible from call to unconstrained
- function _db_addEmpls: _db_addEmpls
-dbase.c:235: Undocumented use of global db
-dbase.c:235: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[fNON]
-dbase.c:235: Undetected modification possible from call to unconstrained
- function _db_addEmpls: _db_addEmpls
-dbase.c:242: Undocumented use of global db
-dbase.c:242: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[mMGRS]
-dbase.c:242: Undetected modification possible from call to unconstrained
- function _db_addEmpls: _db_addEmpls
-dbase.c:243: Undocumented use of global db
-dbase.c:243: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[mNON]
-dbase.c:243: Undetected modification possible from call to unconstrained
- function _db_addEmpls: _db_addEmpls
-dbase.c:246: Undocumented use of global db
-dbase.c:246: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[mMGRS]
-dbase.c:246: Undetected modification possible from call to unconstrained
- function _db_addEmpls: _db_addEmpls
-dbase.c:248: Undocumented use of global db
-dbase.c:248: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[mNON]
-dbase.c:248: Undetected modification possible from call to unconstrained
- function _db_addEmpls: _db_addEmpls
-dbase.c:254: Undocumented use of global db
-dbase.c:254: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[fMGRS]
-dbase.c:254: Undetected modification possible from call to unconstrained
- function _db_addEmpls: _db_addEmpls
-dbase.c:255: Undocumented use of global db
-dbase.c:255: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[fNON]
-dbase.c:255: Undetected modification possible from call to unconstrained
- function _db_addEmpls: _db_addEmpls
-dbase.c:258: Undocumented use of global db
-dbase.c:258: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[fMGRS]
-dbase.c:258: Undetected modification possible from call to unconstrained
- function _db_addEmpls: _db_addEmpls
-dbase.c:260: Undocumented use of global db
-dbase.c:260: Array fetch using non-integer, enum { mMGRS, fMGRS, mNON, fNON }:
- db[fNON]
-dbase.c:260: Undetected modification possible from call to unconstrained
- function _db_addEmpls: _db_addEmpls
-dbase.c:210: Variable er declared but not used
-dbase.c:211: Variable e declared but not used
-dbase.c:263: Suspect object listed in modifies of query not modified: s
- dbase.lcl:49: Specification of query
-dbase.c: (in function db_print)
-dbase.c:272: Assignment of enum { mMGRS, fMGRS, mNON, fNON } to int: i = mMGRS
-dbase.c:272: Operands of <= have incompatible types (int, enum { mMGRS, fMGRS,
- mNON, fNON }): i <= fNON
-dbase.c:274: Undocumented use of global db
-dbase.c:272: Incompatible types for <= (int, enum { mMGRS, fMGRS, mNON, fNON })
- (in post loop test): i <= fNON
-< checking drive.c >
-drive.c: (in function main)
-drive.c:22: Statement has no effect: employee_initMod()
-drive.c:23: Statement has no effect: empset_initMod()
-drive.c:48: Return value (type bool) ignored: employee_setName...
-drive.c:49: Return value (type bool) ignored: empset_insert(em...
-drive.c:64: Return value (type bool) ignored: employee_setName...
-drive.c:65: Return value (type bool) ignored: empset_delete(em...
-drive.c:82: Return value (type bool) ignored: employee_setName...
-drive.c:83: Return value (type bool) ignored: empset_insert(em...
-drive.c:107: Return value (type bool) ignored: empset_delete(em...
-drive.c:116: Body of if clause of if statement is not a block: e.gen = MALE
-drive.c:116: Body of else clause of if statement is not a block: e.gen = FEMALE
-drive.c:117: Body of if clause of if statement is not a block: e.j = NONMGR
-drive.c:117: Body of else clause of if statement is not a block: e.j = MGR
-drive.c:119: Return value (type bool) ignored: employee_setName...
-drive.c:123: Return value (type db_status) ignored: hire(e)
-drive.c:127: Assignment of db_status to int: j = hire(e)
-drive.c:131: Variable j used before definition
-drive.c:134: Return value (type bool) ignored: fire(17)
-drive.c:158: Return value (type bool) ignored: fire(empset_choo...
-drive.c:11: Parameter argv not used
-< checking macros bool.h >
-< global checks >
-dbase.c:11: Type employeeKinds declared but not used
-eref.lh:8: Function exported but not used outside eref: eref_free
- eref.h:23: Definition of eref_free
-empset.lh:8: Function exported but not used outside empset: empset_final
- empset.h:29: Definition of empset_final
-empset.lh:9: Function exported but not used outside empset: empset_clear
- empset.c:24: Definition of empset_clear
-empset.lh:11: Function exported but not used outside empset:
- empset_insertUnique
- empset.c:53: Definition of empset_insertUnique
-empset.lh:17: Function exported but not used outside empset: empset_member
- empset.h:30: Definition of empset_member
-empset.lh:18: Function exported but not used outside empset: empset_subset
- empset.c:144: Definition of empset_subset
-ereftab.lh:10: Function exported but not used outside ereftab: ereftab_delete
- ereftab.c:26: Definition of ereftab_delete
-dbase.c:13: Variable exported but not used outside dbase: db
-dbase.lh:27: Function exported but not used outside dbase: promote
- dbase.c:182: Definition of promote
-dbase.lh:28: Function exported but not used outside dbase: setSalary
- dbase.c:206: Definition of setSalary
-empset.h:10: Variable exported but not used outside empset: known
-dbase.c:15: Variable exported but not used outside dbase: initDone
-dbase.c:40: Function exported but not used outside dbase: _db_ercKeyGet
- dbase.c:54: Definition of _db_ercKeyGet
-dbase.c:56: Function exported but not used outside dbase: _db_keyGet
- dbase.c:71: Definition of _db_keyGet
-dbase.c:73: Function exported but not used outside dbase: _db_addEmpls
- dbase.c:92: Definition of _db_addEmpls
-dbase.c:13: Variable db exported but not declared in header file
-empset.c:5: Function _empset_get exported but not declared in header file
- empset.c:19: Definition of _empset_get
-dbase.c:15: Variable initDone exported but not declared in header file
-dbase.c:40: Function _db_ercKeyGet exported but not declared in header file
- dbase.c:54: Definition of _db_ercKeyGet
-dbase.c:56: Function _db_keyGet exported but not declared in header file
- dbase.c:71: Definition of _db_keyGet
-dbase.c:73: Function _db_addEmpls exported but not declared in header file
- dbase.c:92: Definition of _db_addEmpls
-< cleaning .......... >
-
-Error Type Reported Suppressed
-=================== ======== =========
-abstract 2 0
-mayaliasunique 1 0
-exitarg 8 0
-unreachable 1 0
-forempty 1 0
-forblock 11 0
-ifblock 24 0
-usedef 1 0
-noeffect 11 0
-exporttype 5 0
-exportvar 2 0
-exportconst 2 0
-globs 64 1
-internalglobs 2 0
-warnmissingglobs 1 6
-retvalother 1 0
-retvalbool 16 0
-macroparens 4 0
-usereleased 1 0
-compdef 2 0
-mustfree 3 0
-branchstate 3 2
-onlytrans 1 0
-freshtrans 3 0
-temptrans 3 2
-readonlytrans 6 0
-mods 38 0
-mustmod 2 0
-modfilesys 0 25
-modnomods 4 0
-moduncon 20 0
-modunconnomods 1 0
-ansireserved 9 0
-fcnpost 0 65
-fcnconstraint 0 15
-nullret 1 0
-nullstate 1 0
-sizeoftype 7 0
-formalarray 0 17
-type 1 0
-enumindex 24 0
-relaxtypes 15 0
-matchanyintegral 2 0
-exportlocal 15 0
-exportheader 4 0
-exportheadervar 2 0
-paramuse 1 0
-typeuse 1 0
-varuse 4 0
- ======== =========
-Total 331 133
-
-Finished LCLint checking --- 331 code errors found, as expected
+dbase.lcl:2:1: Cannot find standard import file: stdio.lcs
+*** Cannot continue.
< reading spec employee.lcl >
-< reading spec eref.lcl >
-< reading spec empset.lcl >
-< reading spec ereftab.lcl >
-< reading spec erc.lcl >
-< reading spec dbase.lcl >
-< preprocessing >
-< checking employee.c >
-employee.c: (in function employee_setName)
-employee.c:14: Parameter 1 (e->name) to function strcpy is declared unique but
- may be aliased externally by parameter 2 (na)
-< checking eref.c >
-eref.c: (in function eref_alloc)
-eref.c:19: Unqualified storage eref_Pool.conts passed as only param:
- realloc (eref_Pool.conts, ...)
-eref.c:29: Unqualified storage eref_Pool.status passed as only param:
- realloc (eref_Pool.status, ...)
-eref.c:45: Storage eref_Pool.status reachable from global is only (should be
- unqualified)
- eref.c:30: Storage eref_Pool.status becomes only
-eref.c:45: Storage eref_Pool.conts reachable from global is only (should be
- unqualified)
- eref.c:20: Storage eref_Pool.conts becomes only
-eref.c: (in function eref_initMod)
-eref.c:84: Storage eref_Pool.conts reachable from global is fresh (should be
- unqualified)
- eref.c:62: Fresh storage eref_Pool.conts allocated
-eref.c:84: Global storage *(eref_Pool.conts) contains 4 undefined fields when
- call returns: ssNum, salary, gen, j
-eref.c:84: Storage eref_Pool.status reachable from global is fresh (should be
- unqualified)
- eref.c:70: Fresh storage eref_Pool.status allocated
-eref.c:84: Global storage eref_Pool contains 1 undefined field when call
- returns: status
-< checking empset.c >
-< checking ereftab.c >
-< checking erc.c >
-erc.c: (in function erc_create)
-erc.c:33: Null storage c->vals derivable from return value: c
- erc.c:31: Storage c->vals becomes null
-erc.c:33: Fresh storage returned as unqualified (should be only): c
- erc.c:23: Fresh storage c allocated
-erc.c: (in function erc_clear)
-erc.c:49: Function returns with null storage derivable from parameter c->vals
- erc.c:47: Storage c->vals becomes null
-erc.c: (in function erc_final)
-erc.c:54: Implicitly temp storage c passed as only param: free (c)
-erc.c: (in function erc_delete)
-erc.c:102: Released storage c->vals reachable from parameter at return point
- erc.c:100: Storage c->vals is released
-erc.c: (in function erc_sprint)
-erc.c:141: Fresh storage returned as unqualified (should be only): result
- erc.c:122: Fresh storage result allocated
-< checking dbase.c >
-< checking drive.c >
-< checking macros bool.h >
-< global checks >
-
-Finished LCLint checking --- 15 code errors found, as expected
-
-< reading spec employee.lcl >
-< reading spec eref.lcl >
-< reading spec empset.lcl >
-< reading spec ereftab.lcl >
-< reading spec erc.lcl >
-< reading spec dbase.lcl >
-< preprocessing >
-< checking employee.c >
-employee.c: (in function employee_setName)
-employee.c:14: Parameter 1 (e->name) to function strcpy is declared unique but
- may be aliased externally by parameter 2 (na)
-< checking eref.c >
-eref.c: (in function eref_initMod)
-eref.c:62: Implicitly only storage eref_Pool.conts not released before
- assignment: eref_Pool.conts = (employee *)malloc(size * sizeof(employee))
-eref.c:70: Implicitly only storage eref_Pool.status not released before
- assignment: eref_Pool.status = (eref_status *)malloc(size *
- sizeof(eref_status))
-eref.c:84: Global storage *(eref_Pool.conts) contains 4 undefined fields when
- call returns: ssNum, salary, gen, j
-eref.c:84: Global storage eref_Pool contains 1 undefined field when call
- returns: status
-< checking empset.c >
-empset.c: (in function empset_insertUnique)
-empset.c:44: Clauses exit with er referencing fresh storage in true branch,
- local storage in continuation
- empset.c:41: Fresh storage er allocated
-empset.c: (in function empset_intersect)
-empset.c:126: Fresh storage toDelete not released before return
- empset.c:112: Fresh storage toDelete allocated
-< checking ereftab.c >
-< checking erc.c >
-erc.c: (in function erc_create)
-erc.c:33: Null storage c->vals derivable from return value: c
- erc.c:31: Storage c->vals becomes null
-erc.c: (in function erc_clear)
-erc.c:49: Function returns with null storage derivable from parameter c->vals
- erc.c:47: Storage c->vals becomes null
-erc.c: (in function erc_final)
-erc.c:54: Implicitly temp storage c passed as only param: free (c)
-erc.c: (in function erc_delete)
-erc.c:98: Implicitly only storage prev->next not released before assignment:
- prev->next = elem->next
-erc.c:98: Clauses exit with elem referencing implicitly only storage in true
- branch, local storage in false branch
- erc.c:96: Storage elem becomes implicitly only
-erc.c:98: Storage c->vals->next is kept in one path, but live in another.
- erc.c:98: Storage c->vals->next becomes kept
-erc.c:102: Released storage c->vals reachable from parameter at return point
- erc.c:100: Storage c->vals is released
-< checking dbase.c >
-dbase.c: (in function uncheckedHire)
-dbase.c:121: Fresh storage er not released before return
- dbase.c:108: Fresh storage er allocated
-< checking drive.c >
-drive.c: (in function main)
-drive.c:49: Variable m_res name is not a macro variable (it is a local
- variable), but matches the macro variable namespace prefix "m_"
-drive.c:65: Variable m_res name is not a macro variable (it is a local
- variable), but matches the macro variable namespace prefix "m_"
-drive.c:83: Variable m_res name is not a macro variable (it is a local
- variable), but matches the macro variable namespace prefix "m_"
-drive.c:120: Variable m_res name is not a macro variable (it is a local
- variable), but matches the macro variable namespace prefix "m_"
-drive.c:124: Variable m_res name is not a macro variable (it is a local
- variable), but matches the macro variable namespace prefix "m_"
-drive.c:135: Variable m_res name is not a macro variable (it is a local
- variable), but matches the macro variable namespace prefix "m_"
-drive.c:140: Fresh storage em1 not released before assignment:
- em1 = empset_create()
- drive.c:35: Fresh storage em1 allocated
-drive.c:146: Fresh storage em2 not released before assignment:
- em2 = empset_create()
- drive.c:74: Fresh storage em2 allocated
-drive.c:147: Fresh storage em3 not released before assignment:
- em3 = empset_disjointUnion(em2, em1)
- drive.c:87: Fresh storage em3 allocated
-drive.c:159: Variable m_res name is not a macro variable (it is a local
- variable), but matches the macro variable namespace prefix "m_"
-drive.c:163: Fresh storage em1 not released before return
- drive.c:140: Fresh storage em1 allocated
-drive.c:163: Fresh storage em2 not released before return
- drive.c:146: Fresh storage em2 allocated
-drive.c:163: Fresh storage em3 not released before return
- drive.c:147: Fresh storage em3 allocated
-< checking macros bool.h >
-< global checks >
-
-Finished LCLint checking --- 28 code errors found, as expected
-
-< reading spec employee.lcl >
-< reading spec eref.lcl >
-< reading spec empset.lcl >
-< reading spec ereftab.lcl >
-< reading spec erc.lcl >
-< reading spec dbase.lcl >
-< preprocessing >
-< checking employee.c >
-< checking eref.c >
-< checking empset.c >
-< checking ereftab.c >
-< checking erc.c >
-< checking dbase.c >
-< checking drive.c >
-< checking macros bool.h >
-< global checks >
-
-Finished LCLint checking --- no code errors found
+employee.lcl:2: Cannot find standard import file: stdio.lcs
+*** Cannot continue.