]> andersk Git - splint.git/blame - test/Makefile
Small additions to library
[splint.git] / test / Makefile
CommitLineData
885824d3 1##################################################
2### ###
3### Makefile for LCLint testing ###
4### ###
5### designed for use with GNU make ###
6### ###
7##################################################
8
9.PHONY: all fulltest quicktest funcpointer cast abstract
10.PHONY: version help abstptr abstract alias alttypes ansireserved
11.PHONY: argorder args blocks break cases cast charlit
12.PHONY: clauses commentchar
b9904f57 13.PHONY: compdestroy constannot controldepth csyntax czechnames czechoslovaknames
60eced23 14.PHONY: deadparam decl enum exports external fields fileio flags forbody format funcpointer glob globals
885824d3 15.PHONY: impabstract init inparam internal iter keep libs lintcomments
12f2ffe9 16.PHONY: list macros macrosef merge mergestate modifies modtest moduncon mongoincludes
1d239d69 17.PHONY: noeffect null observer oldstyle outglob outparam postnotnull preds prefixes printflike rc
80ee600a 18.PHONY: refcounts release repexpose returned sharing slovaknames special
19.PHONY: specclauses stack staticarray
20.PHONY: strings structassign nullret
1d239d69 21.PHONY: tainted typequals ud ulstypes union unreachable unused ullint unsignedcompare void
cc78dedd 22.PHONY: db1 db2 db3 tests2.2 tests2.2a tests2.4 tests2.5
885824d3 23.PHONY: all test fulltest expects quicktest
15b3d2b2 24.PHONY: warnuse metastate
80ee600a 25.PHONY: linked freearray
e4c9f289 26.PHONY: sizeoftest
01b933c3 27.PHONY: bufferTest
28.PHONY: simplebufferConstraintTests
80ee600a 29.PHONY: moreBufferTests
754e4dbd 30.PHONY: maxset
31.PHONY: globalbufferannotation
32.PHONY: strchr
33.PHONY: for
885824d3 34
35.SUFFIXES: .out .expect .c .lcl .h .lh .diff
36
37SHELL = /bin/csh -f
38
39# Command to run lclint
b7b694d6 40# ${HOME}/LCLintDev/src/lclint
41LCLINT = lclint
885824d3 42LCLINTP = $(LCLINT)
43
44# Make sure .lclintrc files are not used so test results do not
45# depend on local settings.
46LCLINTRN = $(LCLINTP) -nof -hints -booltype "bool"
4109ede4 47LCLINTR = $(LCLINTRN) -exportlocal +debugfcnconstraint
885824d3 48
1d239d69 49# removed for now: nullret nullassign warnuse
50
ed309918 51# fileio tainted mergestate metastate \
52
b7e84605 53UNITTESTS = \
ed309918 54 fileio tainted metastate \
b7e84605 55 help sizeoftest bufferTest simplebufferConstraintTests \
56 moreBufferTests globalbufferannotation maxset strchr for \
57 abstptr abstract alias alttypes ansireserved argorder args blocks break cases cast \
58 charlit clauses commentchar compdestroy constannot controldepth csyntax czechnames czechoslovaknames deadparam \
59 decl enum exports external fields flags forbody format freearray funcpointer glob globals impabstract \
60 init inparam internal iter keep libs linked lintcomments list macros macrosef merge modifies \
61 modtest moduncon mongoincludes mystrncat noeffect null observer oldstyle \
1d239d69 62 outglob outparam postnotnull preds prefixes \
b7e84605 63 printflike rc refcounts release repexpose returned sharing slovaknames specclauses special stack \
64 staticarray strings structassign \
1d239d69 65 typequals ud ulstypes union unreachable unsignedcompare unused ullint void \
b7e84605 66 tests2.2 tests2.2a tests2.4 tests2.5
885824d3 67
15b3d2b2 68###
69### Attribute checking is not ready for the 3.0.0.9 alpha release:
70###
4109ede4 71
15b3d2b2 72#drl removed the following tests
73#fileio tainted mergestate nullret nullassign warnuse metastate \
4109ede4 74
885824d3 75UNITEXPECTS = $(addsuffix .expect, $(UNITTESTS))
76
77INTEGTESTS = db1 db2 db3
78INTEGEXPECTS = $(addsuffix .expect, $(INTEGTESTS))
79
80LCLINTTESTS = $(UNITTESTS) $(INTEGTESTS)
81
3120b462 82QUICKTESTS = db3
83
885824d3 84all: fulltest
85test: fulltest
86
87GREP = grep
88DIFF = diff
b7b694d6 89
90###
91### This is a kludgey way of processing the output to make it match exactly
92###
93
94CLEANOUTPUT = $(GREP) -v "LCLint 3." | $(GREP) -v "make -e" | $(GREP) -v "make\[" | $(GREP) -v "lclint -nof" | $(GREP) -v "make -e" | $(GREP) -v $(HOME)
885824d3 95
96### not real .c
97
98.c.expect:
99 $(MAKE) -e $(*) |& $(CLEANOUTPUT) > $(*).expect ; \
100 cat $(*).expect
101
102.c.diff:
103 $(MAKE) -e $(*) |& $(CLEANOUTPUT) > $(*).out ; \
104 diff $(*).expect $(*).out
105
106expects:
107 echo "Saving old expects: " ; \
108 more *.expect | cat > expects-`date +"%y-%m-%d-%H"`
109 @$(foreach test, $(UNITTESTS), \
110 echo "Making "$(test)".expect: " ; \
111 $(MAKE) -e $(test) |& $(CLEANOUTPUT) > $(test).expect ; \
112 cat $(test).expect ; )
113 @echo "Integration Tests"
114 @$(foreach test, $(INTEGTESTS), \
115 echo "Making "$(test)".expect: "; \
116 $(MAKE) -e $(test) |& $(CLEANOUTPUT) > $(test).expect ; \
117 cat $(test).expect ; )
118
3120b462 119quicktest:
120 @$(foreach test, $(QUICKTESTS), \
121 echo "Checking "$(test)"... " ; \
122 $(MAKE) -e $(test) |& $(CLEANOUTPUT) > $(test).out ; \
123 $(DIFF) $(test).expect $(test).out ; \
124 if ($$status) echo "*** FAIL ***" ; \
125 )
885824d3 126fulltest:
127 @echo ''
128 @echo 'Testing '$(LCLINTP)
129 @echo ''
130 @echo 'Version:'
131 @echo ''
132 @$(LCLINTP) -help version
133 @$(LCLINTP) -help vars
134 @echo ''
135 @echo "Unit Tests:"
136 @echo ''
137 @$(foreach test, $(UNITTESTS), \
138 echo "Checking "$(test)"... " ; \
139 $(MAKE) -e $(test) |& $(CLEANOUTPUT) > $(test).out ; \
140 $(DIFF) $(test).expect $(test).out ; \
141 if ($$status) echo "*** FAIL ***" ; \
142 )
143 @echo ''
144 @echo "Integration Tests"
145 @echo ''
146 @$(foreach test, $(INTEGTESTS), \
147 echo "Checking "$(test)"... "; \
148 $(MAKE) -e $(test) |& $(CLEANOUTPUT) > $(test).out ; \
149 $(DIFF) $(test).expect $(test).out ; )
150
885824d3 151###
152### Unit Tests
153###
154
155version:
156 -$(LCLINTP) -help version
157
158help:
159 -@$(LCLINTP)
160 -@setenv LARCH_PATH "/dev/null"; $(LCLINTP) empty.lcl
161 -@$(LCLINTP) -help
162 -@$(LCLINTP) -asdf
163 -@$(LCLINTP) +boolint +boolint
164 -@$(LCLINTP) -help flags alpha
165 -@$(LCLINTP) -help flags all
166
167abstptr:
168 $(LCLINTR) abstptr -expect 9
169 $(LCLINTR) abstptr +voidabstract -expect 6
170
171abstract:
172 $(LCLINTR) abst_t.lcl commentcmd.c -expect 15
173
174alias:
175 $(LCLINTR) +lh mut
176 $(LCLINTR) mut alias +globalias -expect 19
177 $(LCLINTR) mut alias2 +globalias -expect 17
178 $(LCLINTR) +lh alias3 -expect 14
179 $(LCLINTR) +lh alias4 +boolint
180 $(LCLINTR) alias4 -pred +retalias -expect 6
181 $(LCLINTR) +lh alias5 +memchecks -null -specundef -expect 5
182
183alttypes:
184 $(LCLINTR) alttypes.c -expect 2
185
80ee600a 186###
187### evans 2001-06-07 - updated nameCheck.c to reflect C9X.
188### Reports one new errors for ansireserved.c - wctomb is bad even as a local variable.
189### (could be a macro?)
190### Reports 3 additional errors for +checks; no longer suppresses name errors in the
191### presense of other errors.
192###
193
885824d3 194ansireserved:
80ee600a 195 $(LCLINTR) ansireserved.c +ansireserved -nolib -expect 9
885824d3 196 $(LCLINTR) ansireserved.c +ansireserved +ansireservedlocal -nolib -expect 11
80ee600a 197 $(LCLINTRN) ansireserved.c +checks -exportlocal -exportheadervar -exportheader -expect 12
198 $(LCLINTR) ansireserved2.c +ansireserved -expect 1
885824d3 199
200argorder:
201 $(LCLINTR) argorder.c -expect 4
202 $(LCLINTR) argorder2 -expect 5
203 $(LCLINTR) argorder3.c -expect 8
204 $(LCLINTR) argorder4 -expect 9
205 $(LCLINTR) argorder4 -evalorder -expect 1
206 $(LCLINTR) argorder5.c +evalorderuncon -expect 3
207
208args:
209 $(LCLINTR) args -noeffect -expect 12
210
211blocks:
212 $(LCLINTR) blocks.c -expect 4
213 $(LCLINTR) blocks.c +ifblock +elseifcomplete -expect 7
214 $(LCLINTR) blocks.c -ifempty +whileempty +whileblock -expect 3
215 $(LCLINTR) blocks.c -ifempty +forempty +forblock -expect 3
216 $(LCLINTR) blocks.c +allempty -expect 6
217 $(LCLINTRN) blocks.c +strict -exportlocal +partial -exportheader -expect 11
218
219break:
220 $(LCLINTR) break.c -expect 4
221 $(LCLINTR) break.c +deepbreak -expect 6
222 $(LCLINTR) break.c +deepbreak -looploopbreak -expect 5
223
224cases:
225 $(LCLINTR) cases.c -expect 5
226 $(LCLINTR) cases2.c -expect 2
227 $(LCLINTRN) cases2.c +checks -exportlocal -exportheader -expect 3
228 $(LCLINTRN) cases2.c +checks -exportlocal -exportheader -branchstate -expect 3
229
230cast:
231 $(LCLINTR) cast -accessmodule -expect 20
232 $(LCLINTRN) cast2.c +checks -exportlocal -exportheader -expect 3
233
cc78dedd 234### Two addition errors detected with 2.5 with -numliteral.
235
885824d3 236charlit:
237 $(LCLINTR) +hints charlit.c -expect 4
cc78dedd 238 $(LCLINTR) +hints -numliteral charlit.c -expect 6
885824d3 239 $(LCLINTR) +hints charlit.c +charintliteral +ignoresigns
240
241clauses:
242 $(LCLINTR) clauses.c +memchecks -expect 4
243 $(LCLINTR) clauses2.c +memchecks
244 $(LCLINTR) clauses3.c +memchecks -expect 2
245 $(LCLINTR) clauses3.c +memchecks +unixlib -expect 3
246
247commentchar:
248 $(LCLINTR) commentchar.c -expect 4
249 $(LCLINTR) -commentchar '#' commentchar.c -expect 4
250
251controldepth:
252 $(LCLINTR) +hints -controlnestdepth 2 controldepth.c -expect 2
253 $(LCLINTR) +hints -controlnestdepth 1 controldepth.c -expect 2
254
255compdestroy:
256 $(LCLINTRN) compdestroy.c +checks -exportlocal -exportheader -expect 1
257 $(LCLINTRN) compdestroy.c +checks -exportlocal -exportheader +strictdestroy -expect 2
258 $(LCLINTRN) compdestroy.c +checks -exportlocal -exportheader +strictdestroy +strictusereleased -expect 3
259 $(LCLINTRN) compdestroy.c +strict +partial -exportheader -expect 3
260
b9904f57 261constannot:
4109ede4 262 ${LCLINTRN} constannot.c +arraybounds -exportlocal -expect 2
b9904f57 263
885824d3 264csyntax:
cc78dedd 265 $(LCLINTR) +quiet -incondefs csyntax.c -expect 1
266 $(LCLINTR) +quiet csyntax2.c -expect 2
267 $(LCLINTR) +quiet csyntax3.c -expect 1
885824d3 268 $(LCLINTR) +quiet -incondefs csyntax4.c
269 $(LCLINTR) +quiet csyntax5.c
270 $(LCLINTR) +quiet csyntax6.c
271 $(LCLINTR) +quiet csyntax7.c
272 $(LCLINTR) +quiet csyntax8.c
273 $(LCLINTR) +quiet csyntax9.c
274 $(LCLINTR) +quiet csyntax10.c
275 $(LCLINTR) +quiet csyntax11.c
276 $(LCLINTR) +quiet csyntax12.c
cc78dedd 277 $(LCLINTR) +quiet csyntax13.c -expect 1
885824d3 278 $(LCLINTR) +quiet csyntax14.c
279 $(LCLINTR) +quiet csyntax15.c
cc78dedd 280 $(LCLINTR) +quiet csyntax16.c -expect 2
281 $(LCLINTR) +quiet csyntax17.c -expect 3
885824d3 282
283czechnames:
284 $(LCLINTR) czechnames.c
285 $(LCLINTR) +hints +czech czechnames.c -expect 2
286 $(LCLINTR) +hints +czech -czechvars czechnames.c -expect 1
287 $(LCLINTR) +hints +czech -accessczech czechnames.c -expect 6
288
289czechoslovaknames:
290 $(LCLINTR) +hints +czechoslovak czechnames.c -expect 1
291 $(LCLINTR) +hints +czechoslovak slovaknames.c -expect 1
292 $(LCLINTR) +hints +czechoslovak +slovakvars slovaknames.c -expect 2
293
80ee600a 294###
295### deadparam added 2001-05-27
296###
297
298deadparam:
299 ${LCLINTR} deadparam.c -expect 3
300
885824d3 301#
302# Was expect 3 before 2.4. Earlier versions did not handle implicit
303# function pointers correctly.
304#
305
306decl:
307 $(LCLINTR) decl.c -expect 2
308 $(LCLINTRN) decl.c +strict -exportlocal -expect 5
309 $(LCLINTR) decl2 -expect 4
310
311enum:
312 $(LCLINTR) enum -expect 16
313 $(LCLINTR) enum -misscase -expect 14
314
315exports:
316 $(LCLINTR) exports.c +exporttype +exportvar +exportfcn +topuse +typeuse -expect 6
317 $(LCLINTR) exports.c +exportany -expect 3
318 $(LCLINTR) exports.c
319
320external:
321 $(LCLINTR) external.c +partial
322 $(LCLINTR) external.c +partial +distinctexternalnames -expect 2
323 $(LCLINTR) external.c -nolib +partial -externalnamelength 3 -expect 3
324 $(LCLINTR) external.c -nolib +partial -externalnamelength 3 +externalnamecaseinsensitive -expect 3
325 $(LCLINTR) external.c +partial -externalnamelength 3 -expect 4
326
327fields:
328 $(LCLINTR) fields.c +memchecks -expect 6
329 $(LCLINTR) fields2.c +memchecks -expect 5
330 $(LCLINTR) fields3.c +memchecks
331
332flags:
333 $(LCLINTR) flags.c -expect 8
334 $(LCLINTR) +nocomments flags.c -expect 2
335
80ee600a 336### Added 2001-06-02
337
338forbody:
339 ${LCLINTR} forbody.c -expect 2
340
341### Added 2001-06-03
342format:
343 ${LCLINTR} format.c -expect 3
344 ${LCLINTR} format.c -formatconst
345
885824d3 346# two new errors (invalid lhs)
347
348funcpointer:
349 $(LCLINTR) +memchecks +noparams funcpointer.c -expect 18
350
351glob:
352 $(LCLINTR) glob -expect 4
353 $(LCLINTR) glob -globuse -expect 3
354 $(LCLINTR) glob +globunspec -expect 6
355
356globals:
357 $(LCLINTR) -modifies globals.c -expect 5
358 $(LCLINTR) -modifies globals.c +allglobals -expect 6
359 $(LCLINTR) -modifies globals.c +impcheckedglobals -expect 6
360 $(LCLINTR) -modifies globals.c -globals -checkstrictglobals -expect 2
361 $(LCLINTR) -modifies globals.c +globunspec -expect 6
362 $(LCLINTR) -modifies globals.c +globunspec +allglobals -expect 8
363
80ee600a 364# Was -accessfile
365impabstract:
366 $(LCLINTR) -accessmodule impabstract.c
367 $(LCLINTR) -accessmodule +hints +impabstract impabstract.c -expect 2
368 $(LCLINTR) -accessmodule +hints +impabstract impabstract -expect 4
885824d3 369
370init:
371 $(LCLINTR) init.c -expect 12
372 $(LCLINTRN) init.c +checks -exportlocal -exportheadervar -expect 15
373
374inparam:
375 $(LCLINTR) inparam.c -expect 2
376 $(LCLINTR) +impouts inparam.c -expect 1
377
378internal:
379 $(LCLINTR) internal.c -expect 1
380 $(LCLINTR) internal.c +distinctinternalnames -expect 2
381 $(LCLINTR) internal.c -internalnamelen 28 -expect 3
382 $(LCLINTR) internal.c +internalnamecaseinsensitive -expect 3
383 $(LCLINTR) internal.c +internalnamecaseinsensitive +internalnamelookalike -expect 11
384
80ee600a 385###
386### iter
387### 2001-06-06: Error message for iter.lcl:3,6 fixed to iter.lcl:3:6
388###
389
885824d3 390iter:
391 $(LCLINTR) iter -expect 14 -lclexpect 1
392 $(LCLINTR) iter2.c -expect 12
393
394keep:
395 $(LCLINTR) keep.c +memchecks -expect 6
396
80ee600a 397### libs
398### 2001-05-22: 2 new errors found (fixed spec of signal)
399### 2001-05-30: 3 new errors found (formatconst)
885824d3 400
401libs:
80ee600a 402 $(LCLINTR) libs.c +longunsignedunsignedintegral -expect 18
403 $(LCLINTR) libs.c -expect 22
404 $(LCLINTR) libs.c +globunspec +modunspec -expect 25
405 $(LCLINTR) libs.c +strictlib +globunspec +modunspec -expect 42
885824d3 406
407lintcomments:
408 $(LCLINTR) lintcomments.c -expect 4
409 $(LCLINTR) lintcomments.c -warnlintcomments -expect 1
410 $(LCLINTR) lintcomments.c -lintcomments -expect 4
411
412list:
413 $(LCLINTR) list.c -expect 3
414
415macros:
416 $(LCLINTR) macros -expect 17
417 $(LCLINTR) macros.c +allmacros -expect 34
418 $(LCLINTR) macros.c +fcnmacros -expect 31
419
420
421macrosef:
422 $(LCLINTR) macrosef -expect 4
423 $(LCLINTR) macrosef.c +allmacros -expect 3
424 $(LCLINTR) macrosef.c +allmacros +sefuncon -expect 4
425
426merge:
427 $(LCLINTRN) merge.c +checks -exportlocal -exportheadervar -exportheader -expect 3
428
429modifies:
430 $(LCLINTR) modifies.c modclient.c +impcheckedstatics +mustmod -expect 7
431
432modtest:
433 $(LCLINTR) modtest -expect 10
434 $(LCLINTR) modtest +modunspec -expect 13
435 $(LCLINTR) modtest +mustmod -expect 14
436
437moduncon:
438 $(LCLINTR) moduncon.c +moduncon -memchecks -expect 4
439 $(LCLINTRN) moduncon.c +strict -exportlocal -expect 22
440
441mongoincludes:
442 $(LCLINTR) mongoincludes.c -includenest 1 -expect 19
443 $(LCLINTR) mongoincludes.c -includenest 2 -expect 10
444 $(LCLINTR) mongoincludes.c -includenest 3 -expect 4
445 $(LCLINTR) mongoincludes.c -includenest 4 -expect 1
446 $(LCLINTR) mongoincludes.c -includenest 5 -expect 0
447
3120b462 448mystrncat:
4109ede4 449 $(LCLINTR) mystrncat.c +arraybounds +arrayboundsread -expect 4
3120b462 450
ccf0a4a8 451noeffect:
b7b694d6 452 ${LCLINT} -nof noeffect.c +allmacros +checks -expect 3
ccf0a4a8 453
885824d3 454null:
455 $(LCLINTR) null1.c -expect 14
456 $(LCLINTR) null1.c -null -expect 4
457 $(LCLINTR) null2.c -expect 10
458 $(LCLINTR) null3.c -expect 15
459 $(LCLINTR) null3.c -warnunixlib +unixlib -expect 16
460 $(LCLINTR) null4.c -expect 1
461 $(LCLINTR) null5.c -expect 4
462 $(LCLINTR) null6 -expect 4
463 $(LCLINTR) +quiet null6.lcl -dump null6
464 $(LCLINTR) null6.c -load null6 -expect 4
465
80ee600a 466### Added for 3.0 (bugs reported by Kevin Broady)
467
468nullret:
469 $(LCLINTR) nullret.c -expect 2
470 $(LCLINTR) -nullret nullret.c -expect 1
471
472nullassign:
473 $(LCLINTR) nullassign.c -expect 2
474 $(LCLINTR) -nullassign nullassign.c -expect 1
475
476
885824d3 477#
478# Before 2.4, expected one more because error was reported both as
479# dependent and observer.
480#
481
482observer:
483 $(LCLINTRN) observer +checks -exportlocal -exportheader -expect 9
484 $(LCLINTRN) observer.c +checks -exportlocal -exportheader -expect 8
485 $(LCLINTR) observer.c -expect 7
486
487oldstyle:
488 $(LCLINTR) oldstyle -expect 3
489
490outglob:
491 $(LCLINTR) outglob -expect 10
492
493outparam:
494 $(LCLINTR) outparam -expect 12
495
1d239d69 496### evans 2001-08-26: postnotnull new
497
498postnotnull:
499 ${LCLINTR} postnotnull.c -expect 1
efd360a3 500#
501# Four new +fcnuse errors for -strict (evans 2001-07-22)
502#
503
885824d3 504preds:
505 $(LCLINTR) +hints preds.c -expect 6
506 $(LCLINTRN) +hints preds.c -weak -expect 1
efd360a3 507 $(LCLINTRN) +hints preds.c -strict -exportlocal -exportheader -expect 12
885824d3 508
509prefixes:
510 $(LCLINTR) prefixes.c +partial
511 $(LCLINTRN) prefixes.c +allmacros +checks -exportlocal +partial -exportheader -exportheadervar -expect 4
512 $(LCLINTR) prefixes.c -typeprefix "T" -expect 2
513 $(LCLINTR) prefixes.c -typeprefix "^" -expect 1
514 $(LCLINTR) prefixes.c -typeprefix "^*" -expect 2
515 $(LCLINTR) prefixes.c -typeprefix "^%*" -expect 2
516 $(LCLINTR) prefixes.c -typeprefix "^~*" -expect 2
517 $(LCLINTR) prefixes.c -typeprefix "^" +typeprefixexclude -expect 7
518 $(LCLINTR) prefixes.c -filestaticprefix "^^" -expect 4
519 $(LCLINTR) prefixes.c -filestaticprefix "^#" -expect 5
520 $(LCLINTR) prefixes.c -filestaticprefix "^?&x" -expect 5
521 $(LCLINTR) prefixes.c -globalprefix "G" -expect 1
522 $(LCLINTR) prefixes.c -globalprefix "&G?_^" -expect 1
523 $(LCLINTR) prefixes.c -externalprefix "G" -expect 5
524 $(LCLINTR) prefixes.c -typeprefix "T" -externalprefix "G" -expect 4
525 $(LCLINTR) prefixes.c -localprefix "?*" +localprefixexclude -expect 13
526
527printflike:
528 $(LCLINTR) printflike.c -expect 6
529 $(LCLINTR) printflike.c -warnlintcomments -expect 5
530
531rc:
cc78dedd 532 $(LCLINTR) -DMYSTERY='"a flag\"wicked cool"' rc.c -expect 1
533 $(LCLINTR) -DMYSTERY=12 rc.c -expect 1
534 $(LCLINTR) -f rc1.lclintrc rc.c -expect 1
535 $(LCLINTR) -UMYSTERY -f rc1.lclintrc rc.c -expect 1
536 $(LCLINTR) -f rc3.lclintrc rc.c -expect 1
885824d3 537
538refcounts:
539 $(LCLINTR) refcounts.c -expect 7
540
541release:
542 $(LCLINTR) release.c +memchecks -expect 1
543
544repexpose:
545 $(LCLINTR) +lh repexpose +memchecks -expect 12
546 $(LCLINTR) repexpose +memchecks +retalias -expect 15
547 $(LCLINTRN) repexpose +checks -exportlocal -expect 27
548
80ee600a 549### returned added 2001-05-27
550### (Bug discovered checking lclint sources.)
551
552returned:
553 ${LCLINTR} returned.c -expect 1
554
885824d3 555sharing:
556 $(LCLINTR) sharing1.c -expect 21
557 $(LCLINTR) sharing3.c -expect 3
558 $(LCLINTR) sharing4.c -expect 13
559 $(LCLINTR) sharing4.c -paramimptemp -expect 12
560 $(LCLINTR) sharing5.c -expect 6
561
562slovaknames:
563 $(LCLINTR) +hints slovaknames.c -expect 1
564 $(LCLINTR) +hints slovaknames.c +accessslovak
565 $(LCLINTR) +hints +slovak slovaknames.c -expect 3
566 $(LCLINTR) +hints +slovak -slovakvars slovaknames.c -expect 2
567 $(LCLINTR) +hints +slovak -accessslovak slovaknames.c -expect 7
568
569specclauses:
570 $(LCLINTR) specclauses.c -expect 6
571 $(LCLINTR) specclauses2.c -expect 8
572 $(LCLINTR) specclauses3.c -expect 6
573 $(LCLINTR) specclauses4.c -expect 3
574 $(LCLINTR) specclauses5.c -expect 3
575
576special:
577 $(LCLINTR) special -expect 20
578 $(LCLINTR) special -relaxquals -expect 22
579
580stack:
581 $(LCLINTR) stack.c -expect 5
582 $(LCLINTR) stack.c -stackref
583
584staticarray:
585 $(LCLINTR) staticarray.c -expect 3
586
587strings:
588 $(LCLINTR) strings.c -expect 3
589 $(LCLINTR) -readonlystrings -expect 1 strings.c
590 $(LCLINTR) +modobserverstrict -maintype -expect 4 strings.c
591
592structassign:
593 $(LCLINTR) structassign.c -expect 4
594
595typequals:
596 $(LCLINTR) typequals.c tq.lcl -expect 5
597 $(LCLINTR) typequals.c -expect 2
598
599ud:
600 $(LCLINTR) ud.c -expect 9
601 $(LCLINTR) ud2 -specundef -expect 3
602
603ulstypes:
604 $(LCLINTR) ulstypes.c -expect 8
605 $(LCLINTR) ulstypes.c +ignorequals
606 $(LCLINTRN) ulstypes.c +strict -exportheader -exportheadervar -expect 28
cc78dedd 607# 3 more detected with version 2.5 (change in -numliteral setting)
885824d3 608
609union:
610 $(LCLINTR) +memchecks union.c -expect 8
611
612unreachable:
613 $(LCLINTR) unreachable.c -expect 5
614 $(LCLINTR) -unreachable unreachable.c -expect 2
615 $(LCLINTR) switch.c -expect 4
616
1d239d69 617unsignedcompare:
f828bc63 618 ${LCLINTR} +posixlib unsignedcompare.c -expect 4
1d239d69 619
620
80ee600a 621###
622### 2001-06-08 evans: 2 new errors after fixing ansireserved name checks
623###
624
885824d3 625unused:
80ee600a 626 $(LCLINTRN) unused.c +checks -exportlocal -expect 5
627 $(LCLINTRN) unused.c +checks -exportlocal +topuse -expect 8
628
629###
630### 2001-06-10: Provided by Jim Zalenka
631###
632
633ullint:
634 ${LCLINTRN} ullint.c -expect 5
635 ${LCLINTRN} ullint.c +charint +charintliteral -expect 2
636
637void:
638 ${LCLINTRN} void.c -expect 2
639
640###
641### New since 2.5q:
642###
643
644linked:
645 ${LCLINTR} linked.c -expect 4
646 ${LCLINTR} linked2.c -expect 3
647 ${LCLINTR} linked3.c -expect 5
648 ${LCLINTR} linked4.c -expect 6
649 ${LCLINTR} linked5.c -expect 4
650 ${LCLINTR} linked6.c -expect 4
651
652freearray:
653 ${LCLINTR} freearray.c -expect 1
885824d3 654
655###
656### Bugs fixed and new features since version 2.1b
657###
658
659tests2.2:
80ee600a 660 setenv LCLINT '$(LCLINTRN)'; cd tests2.2 ; $(MAKE) -e
885824d3 661
662tests2.2a:
663 @cd tests2.2a ; \
664 $(LCLINTR) erik.c -expect 1 ; \
665 $(LCLINTR) boolcomp.c -expect 5 ; \
666 $(LCLINTR) boolenum.c ; \
667 $(LCLINTR) addassign.c -expect 1; \
668 $(LCLINTR) toralf.c -expect 5 ; \
669 $(LCLINTR) fred.c -booltype Bool ; \
670 $(LCLINTR) sizeof.c ; \
671 $(LCLINTR) arrayparam.c -expect 5 ; \
672 $(LCLINTR) notreached.c ; \
cc78dedd 673 $(LCLINTR) duff.c -casebreak -firstcase ; \
885824d3 674 $(LCLINTR) obviousloop.c -expect 4 ; \
675 $(LCLINTR) bitops.c +bitwisesigned -expect 11 ; \
676 $(LCLINTR) bitops.c -expect 5 ; \
677 $(LCLINTR) isalpha.c +strictlib -expect 1 ; \
678 $(LCLINTR) isalpha.c -expect 1 ; \
679 $(LCLINTR) dobb.c ; \
680 $(LCLINTR) popik.c -expect 11
681
682tests2.4:
80ee600a 683 setenv LCLINT '$(LCLINTRN)'; cd tests2.4 ; $(MAKE) -e
885824d3 684
e4c9f289 685sizeoftest:
686 @cd sizeoftest; \
4109ede4 687 $(LCLINTR) +arraybounds +arrayboundsread sizeof.c
1ac6313d 688
01b933c3 689bufferTest:
690 @cd bufferTest; \
4109ede4 691 $(LCLINTR) +arraybounds +arrayboundsread test4.c test6.c
01b933c3 692
693simplebufferConstraintTests:
694 @cd simplebufferConstraintTests; \
4109ede4 695 $(LCLINTR) +arraybounds +arrayboundsread m.c sizeof.c test3.c test7.c
01b933c3 696
80ee600a 697moreBufferTests:
698 @cd moreBufferTests; \
4109ede4 699 $(LCLINTR) +arraybounds +arrayboundsread unrecogCall.c strrchr.c initialization.c simplifyTest.c strncatNotReallyGood.c strncatReallyGood.c
80ee600a 700
754e4dbd 701maxset:
702 @cd maxset; \
e83c79ec 703 $(LCLINTR) +arraybounds maxsetannotations.c; \
704 $(LCLINTR) +arraybounds maxsetnoannotations.c -expect 1
754e4dbd 705
706globalbufferannotation:
707 @cd globalbufferannotation; \
4109ede4 708 $(LCLINTR) +arraybounds +arrayboundsread globalvariable.c
754e4dbd 709
710strchr:
711 @cd strchr; \
0bf5022d 712 $(LCLINTR) +arraybounds +arrayboundsread strchr.c -expect 2
754e4dbd 713
714for:
715 @cd for; \
4109ede4 716 $(LCLINTR) +arraybounds +arrayboundsread for.c
754e4dbd 717
cc78dedd 718tests2.5:
719 setenv LCLINT '$(LCLINTRN)'; cd tests2.5 ; $(MAKE) -e
720
80ee600a 721metastate:
722 setenv LCLINT '$(LCLINTRN)'; cd metastate ; $(MAKE) -e
723
12f2ffe9 724mergestate:
725 setenv LCLINT '$(LCLINTRN)'; cd mergestate ; $(MAKE) -e
726
990ec868 727tainted:
728 setenv LCLINT '$(LCLINTRN)'; cd tainted ; $(MAKE) -e
729
60eced23 730fileio:
731 setenv LCLINT '$(LCLINTRN)'; cd fileio ; $(MAKE) -e
732
80ee600a 733warnuse:
734 setenv LCLINT '$(LCLINTRN)'; cd warnuse ; $(MAKE) -e
735
d9a28762 736ensuresclauses:
737 setenv LCLINT '$(LCLINTRN)'; cd ensuresclauses ; $(MAKE) -e
738
885824d3 739###
740### Integration Tests
741###
742
743db1:
744 setenv LCLINT '$(LCLINTRN)'; cd db1; $(MAKE) -e test
745
80ee600a 746
747### evans 2000-12-22
748### 2 errors are no longer reported, since eref is immutable.
749### Need to clarify what it means for an object to be immutable;
750### there should be 2 types with different storage requirements.
751
885824d3 752db2:
753 setenv LCLINT '$(LCLINTRN)'; cd db2; $(MAKE) -e test
754
755db3:
756 setenv LCLINT '$(LCLINTRN)'; cd db3; $(MAKE) -e test
757
885824d3 758clean:
759 -rm -f *~ #*# *.o *.lcs a.out
760 -cd db1 ; $(MAKE) clean
761 -cd db2 ; $(MAKE) clean
762 -cd db3 ; $(MAKE) clean
763
764
765
cc78dedd 766
This page took 0.185286 seconds and 5 git commands to generate.