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