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