adlint 1.12.0 → 1.14.0

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,3 +1,104 @@
1
+ Wed Jul 4 10:42:39 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
2
+
3
+ * release.ga : 1.14.0
4
+ - Add W0645 detection.
5
+ - Add W0697 detection.
6
+ - Add W0700 detection.
7
+ - Add W1066 detection.
8
+ - Add W1067 detection.
9
+ - Add W1068 detection.
10
+ - Add W1069 detection.
11
+ - Add W1070 detection.
12
+ - Add W1072 detection.
13
+ - Fix W0104 detection not to warn when the unchanged parameter is
14
+ typed with `const volatile' qualifiers.
15
+ - Add W0104, W0645, W0697, W0700, W1066, W1067, W1068, W1069, W1070
16
+ and W1072 functional specifications.
17
+
18
+ Mon Jul 2 17:34:36 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
19
+
20
+ * release.rc : 1.13.0
21
+ - This is the initial release candidate for 1.14.0 GA release.
22
+ - Add W0645 detection.
23
+ - Add W0697 detection.
24
+ - Add W0700 detection.
25
+ - Add W1066 detection.
26
+ - Add W1067 detection.
27
+ - Add W1068 detection.
28
+ - Add W1069 detection.
29
+ - Add W1070 detection.
30
+ - Add W1072 detection.
31
+ - Fix W0104 detection not to warn when the unchanged parameter is
32
+ typed with `const volatile' qualifiers.
33
+ - Add W0104, W0645, W0697, W0700, W1066, W1067, W1068, W1069, W1070
34
+ and W1072 functional specifications.
35
+
36
+ Mon Jul 2 17:28:14 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
37
+
38
+ * features/message_detection/W0104.feature : Add W0104 functional
39
+ specification to reproduce a known bug.
40
+ * MANIFEST : Ditto.
41
+
42
+ * lib/adlint/c/type.rb : Fix bad qualified type object structure.
43
+
44
+ Mon Jul 2 13:54:32 2012 Rie Shima <rkakuuchi@users.sourceforge.net>
45
+
46
+ * share/doc/users_guide_ja.texi : Update descriptions about W0645,
47
+ W0697, W0700, W1066, W1067, W1068, W1069, W1070 and W1072
48
+ messages.
49
+ * share/doc/users_guide_en.texi : Ditto.
50
+
51
+ Fri Jun 29 10:04:56 2012 Rie Shima <rkakuuchi@users.sourceforge.net>
52
+
53
+ * lib/adlint/c/message_shima.rb : Add W0645, W0697 and W0700
54
+ detections.
55
+ * lib/adlint/c/phase.rb : Ditto.
56
+
57
+ * features/message_detection/W0645.feature : Add W0645 functional
58
+ specification.
59
+ * features/message_detection/W0697.feature : Add W0697 functional
60
+ specification.
61
+ * features/message_detection/W0700.feature : Add W0700 functional
62
+ specification.
63
+ * MANIFEST : Add W0645, W0697 and W0700 functional specifications.
64
+
65
+ Thu Jun 28 18:26:16 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
66
+
67
+ * lib/adlint/c/interp.rb : Refactor long method of FunctionInterpreter.
68
+
69
+ Wed Jun 27 15:00:25 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
70
+
71
+ * lib/adlint/c/interp.rb : Add implicit return notification.
72
+ * lib/adlint/c/mediator.rb : Ditto.
73
+
74
+ Fri Jun 22 15:37:18 2012 Rie Shima <rkakuuchi@users.sourceforge.net>
75
+
76
+ * lib/adlint/c/message_shima.rb : Add W1069, W1070 and W1072
77
+ detections.
78
+ * lib/adlint/c/phase.rb : Ditto.
79
+
80
+ * features/message_detection/W1069.feature : Add W1069 functional
81
+ specification.
82
+ * features/message_detection/W1070.feature : Add W1070 functional
83
+ specification.
84
+ * features/message_detection/W1072.feature : Add W1072 functional
85
+ specification.
86
+ * MANIFEST : Add W1069, W1070 and W1072 functional specifications.
87
+
88
+ Thu Jun 21 14:52:12 2012 Rie Shima <rkakuuchi@users.sourceforge.net>
89
+
90
+ * lib/adlint/c/message_shima.rb : Add W1066, W1067 and W1068
91
+ detections.
92
+ * lib/adlint/c/phase.rb : Ditto.
93
+
94
+ * features/message_detection/W1066.feature : Add W1066 functional
95
+ specification.
96
+ * features/message_detection/W1067.feature : Add W1067 functional
97
+ specification.
98
+ * features/message_detection/W1068.feature : Add W1068 functional
99
+ specification.
100
+ * MANIFEST : Add W1066, W1067 and W1068 functional specifications.
101
+
1
102
  Wed Jun 20 13:36:49 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
2
103
 
3
104
  * release.ga : 1.12.0
@@ -25,8 +126,8 @@ Wed Jun 20 10:49:52 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
25
126
 
26
127
  Wed Jun 20 10:46:17 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
27
128
 
28
- * lib/adlint/c/message.rb : Revise W9003 specification not to
29
- over-warn about natural conversions.
129
+ * lib/adlint/c/message.rb : Revise W9003 specification not to over-warn
130
+ about natural conversions.
30
131
 
31
132
  Tue Jun 19 17:37:04 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
32
133
 
@@ -39,8 +140,8 @@ Tue Jun 19 16:33:54 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
39
140
  specification.
40
141
  * MANIFEST : Ditto.
41
142
 
42
- * lib/adlint/c/type.rb : Add Type#standard? predicate method and
43
- insert StandardFloatingType in FloatingType class hierarchy.
143
+ * lib/adlint/c/type.rb : Add Type#standard? predicate method and insert
144
+ StandardFloatingType in FloatingType class hierarchy.
44
145
 
45
146
  * lib/adlint/c/type.rb : Revise integer-promotion rule of any
46
147
  enumerated types in order not to over-warn W9003 about enum-enum
@@ -95,8 +196,8 @@ Wed Jun 13 15:57:32 2012 Rie Shima <rkakuuchi@users.sourceforge.net>
95
196
 
96
197
  * lib/adlint/c/syntax.rb : Add predicate methods to check whether an
97
198
  expression is #arithmetic? or #bitwise?.
98
- * spec/adlint/c/syntax_spec.rb : Add unit specifications of syntax
99
- tree of the C language.
199
+ * spec/adlint/c/syntax_spec.rb : Add unit specifications of syntax tree
200
+ of the C language.
100
201
  * MANIFEST : Ditto.
101
202
 
102
203
  * lib/adlint/c/message_shima.rb : Add W0732, W0733, W0734 and W0735
@@ -116,8 +217,8 @@ Wed Jun 13 15:57:32 2012 Rie Shima <rkakuuchi@users.sourceforge.net>
116
217
 
117
218
  Wed Jun 13 11:59:36 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
118
219
 
119
- * lib/adlint/c/ctrlexpr.rb : Revise the value domain narrowing in
120
- order not to under-narrow a value domain of the controlling variable.
220
+ * lib/adlint/c/ctrlexpr.rb : Revise the value domain narrowing in order
221
+ not to under-narrow a value domain of the controlling variable.
121
222
  * lib/adlint/c/value.rb : Ditto.
122
223
 
123
224
  * features/message_detection/W0093.feature : Add W0093 functional
@@ -162,8 +263,8 @@ Fri Jun 8 14:43:14 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
162
263
  specification to reproduce a known bug.
163
264
  * MANIFEST : Ditto.
164
265
 
165
- * lib/adlint/c/ctrlexpr.rb : Revise the value domain narrowing in
166
- order not to over-narrow a value domain of the controlling variable.
266
+ * lib/adlint/c/ctrlexpr.rb : Revise the value domain narrowing in order
267
+ not to over-narrow a value domain of the controlling variable.
167
268
 
168
269
  Thu Jun 7 16:30:23 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
169
270
 
@@ -206,8 +307,7 @@ Wed Jun 6 10:19:58 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
206
307
  convertibility correctly.
207
308
  - Fix W1031 detection not to warn when the declaration with `static'
208
309
  and definition without storage-class-specifier.
209
- - Fix lack of sequence-point notification of controlling
210
- expressions.
310
+ - Fix lack of sequence-point notification of controlling expressions.
211
311
  - Add unit specifications of C type models.
212
312
  - Add W0001, W0002, W0003, W0007, W0010, W0013, W0109, W0583, W0606,
213
313
  W0698, W0699, W0703, W0716, W0717, W0718, W0723 and W1031
@@ -314,8 +414,7 @@ Thu May 31 09:43:09 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
314
414
  - Fix W0500 detection not to warn when two standalone binary
315
415
  arithmetic expressions are appears at 2nd and 3rd expressions of a
316
416
  conditional-expression.
317
- - Fix lack of sequence-point notification of controlling
318
- expressions.
417
+ - Fix lack of sequence-point notification of controlling expressions.
319
418
  - Fix W0582, W0583 and W0584 detections in order to consider type
320
419
  convertibility correctly.
321
420
  - Add unit specifications of C type models.
@@ -329,8 +428,8 @@ Wed May 30 22:23:41 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
329
428
 
330
429
  Wed May 30 20:17:38 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
331
430
 
332
- * lib/adlint/c/conv.rb : Fix Type#same_as? method invocation to
333
- conform with lhs and rhs order of other invocations.
431
+ * lib/adlint/c/conv.rb : Fix Type#same_as? method invocation to conform
432
+ with lhs and rhs order of other invocations.
334
433
  * lib/adlint/c/expr.rb : Ditto.
335
434
  * lib/adlint/c/object.rb : Ditto.
336
435
  * lib/adlint/c/message.rb : Ditto.
@@ -343,8 +442,8 @@ Wed May 30 20:17:38 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
343
442
 
344
443
  Wed May 30 19:18:11 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
345
444
 
346
- * lib/adlint/c/type.rb : Add Type#convertible?(to_type) method to
347
- check whether a type is implicitly convertible to another type.
445
+ * lib/adlint/c/type.rb : Add Type#convertible?(to_type) method to check
446
+ whether a type is implicitly convertible to another type.
348
447
 
349
448
  * spec/adlint/c/type_spec.rb : Add more unit specifications of C type
350
449
  models.
@@ -382,8 +481,8 @@ Tue May 29 13:11:02 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
382
481
 
383
482
  Tue May 29 11:55:44 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
384
483
 
385
- * lib/adlint/c/ctrlexpr.rb : Fix lack of sequence-point notification
386
- of controlling expressions.
484
+ * lib/adlint/c/ctrlexpr.rb : Fix lack of sequence-point notification of
485
+ controlling expressions.
387
486
 
388
487
  Mon May 28 17:42:19 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
389
488
 
@@ -587,8 +686,8 @@ Thu May 17 18:32:49 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
587
686
 
588
687
  Thu May 17 16:08:47 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
589
688
 
590
- * lib/adlint/c/type.rb : Add query interface tells whether the
591
- receiver type is a type of function parameters or not.
689
+ * lib/adlint/c/type.rb : Add query interface tells whether the receiver
690
+ type is a type of function parameters or not.
592
691
 
593
692
  * lib/adlint/c/message.rb : Fix W0101, W0102, W0103 and W0107
594
693
  detections not to warn when an address of the parameter array
@@ -612,8 +711,8 @@ Wed May 16 11:57:18 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
612
711
  Wed May 16 11:33:03 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
613
712
 
614
713
  * lib/adlint/c/ctrlexpr.rb : Fix bad expression evaluation
615
- notification not to notify that an equality-expression evaluated
616
- when a relational-expression is evaluated.
714
+ notification not to notify that an equality-expression evaluated when
715
+ a relational-expression is evaluated.
617
716
 
618
717
  Wed May 16 10:53:56 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
619
718
 
@@ -724,9 +823,9 @@ Fri Apr 27 14:24:03 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
724
823
  * release.rc : 1.7.6
725
824
  - Fix W0582, W0583 and W0584 detections to warn when the number of
726
825
  parameters is greater than the number of arguments.
727
- - Fix W0581 detection to warn when the number of arguments in
728
- current function call is greater than the number of arguments in
729
- previous function calls.
826
+ - Fix W0581 detection to warn when the number of arguments in current
827
+ function call is greater than the number of arguments in previous
828
+ function calls.
730
829
  - Revise specification of W0541 and W0832 detections to warn at the
731
830
  inline assembly code.
732
831
 
@@ -737,9 +836,9 @@ Fri Apr 27 14:18:05 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
737
836
 
738
837
  Fri Apr 27 13:40:05 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
739
838
 
740
- * lib/adlint/c/message.rb : Fix W0581 detection to warn when the
741
- number of arguments in current function call is greater than the
742
- number of arguments in previous function calls.
839
+ * lib/adlint/c/message.rb : Fix W0581 detection to warn when the number
840
+ of arguments in current function call is greater than the number of
841
+ arguments in previous function calls.
743
842
 
744
843
  * lib/adlint/c/message.rb : Fix W0582, W0583 and W0584 detections to
745
844
  warn when the number of parameters is greater than the number of
@@ -752,8 +851,8 @@ Fri Apr 27 11:50:47 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
752
851
  owned by a temporary variable.
753
852
  - Fix W0461 and W0462 detections not to warn when the length omitted
754
853
  array parameter is specified as an argument.
755
- - Fix W1031 detection not to warn when the storage-class-specifier
756
- of the object declaration is explicitly specified and the
854
+ - Fix W1031 detection not to warn when the storage-class-specifier of
855
+ the object declaration is explicitly specified and the
757
856
  storage-class-specifier of following object definition is omitted.
758
857
  - Fix W0581, W0582, W0583 and W0584 detections not to warn when the
759
858
  corresponding types of argument and parameter are array-array or
@@ -796,8 +895,8 @@ Thu Apr 26 09:28:26 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
796
895
 
797
896
  Thu Apr 26 06:22:54 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
798
897
 
799
- * lib/adlint/c/value.rb : Remove redundant original value's snapshot
800
- of the value version management.
898
+ * lib/adlint/c/value.rb : Remove redundant original value's snapshot of
899
+ the value version management.
801
900
 
802
901
  Wed Apr 25 23:17:06 2012 Yutaka Yanoh <yanoh@users.sourceforge.net>
803
902
 
data/MANIFEST CHANGED
@@ -35,15 +35,19 @@ features/message_detection/W0007.feature
35
35
  features/message_detection/W0010.feature
36
36
  features/message_detection/W0013.feature
37
37
  features/message_detection/W0093.feature
38
+ features/message_detection/W0104.feature
38
39
  features/message_detection/W0109.feature
39
40
  features/message_detection/W0583.feature
40
41
  features/message_detection/W0606.feature
42
+ features/message_detection/W0645.feature
41
43
  features/message_detection/W0687.feature
42
44
  features/message_detection/W0688.feature
43
45
  features/message_detection/W0689.feature
44
46
  features/message_detection/W0690.feature
47
+ features/message_detection/W0697.feature
45
48
  features/message_detection/W0698.feature
46
49
  features/message_detection/W0699.feature
50
+ features/message_detection/W0700.feature
47
51
  features/message_detection/W0703.feature
48
52
  features/message_detection/W0716.feature
49
53
  features/message_detection/W0717.feature
@@ -55,6 +59,12 @@ features/message_detection/W0734.feature
55
59
  features/message_detection/W0735.feature
56
60
  features/message_detection/W1031.feature
57
61
  features/message_detection/W1052.feature
62
+ features/message_detection/W1066.feature
63
+ features/message_detection/W1067.feature
64
+ features/message_detection/W1068.feature
65
+ features/message_detection/W1069.feature
66
+ features/message_detection/W1070.feature
67
+ features/message_detection/W1072.feature
58
68
  features/message_detection/W9001.feature
59
69
  features/message_detection/W9003.feature
60
70
  features/step_definitions/message_detection_steps.rb
data/NEWS CHANGED
@@ -21,6 +21,28 @@
21
21
 
22
22
  ++
23
23
 
24
+ === \AdLint 1.14.0 is released (2012-07-04)
25
+
26
+ ==== Changes since the 1.12.0 release
27
+
28
+ * Add W0645 detection
29
+ * Add W0697 detection
30
+ * Add W0700 detection
31
+ * Add W1066 detection
32
+ * Add W1067 detection
33
+ * Add W1068 detection
34
+ * Add W1069 detection
35
+ * Add W1070 detection
36
+ * Add W1072 detection
37
+ * Fix W0104 detection not to warn when the unchanged parameter is typed with
38
+ `const volatile' qualifiers
39
+ * Add W0104, W0645, W0697, W0700, W1066, W1067, W1068, W1069, W1070 and W1072
40
+ functional specifications
41
+
42
+ See the file
43
+ {ChangeLog}[http://adlint.sourceforge.net/pmwiki/upload.d/Main/ChangeLog]
44
+ for more details.
45
+
24
46
  === \AdLint 1.12.0 is released (2012-06-20)
25
47
 
26
48
  ==== Changes since the 1.10.0 release
@@ -40,10 +62,6 @@
40
62
  * Add W1066, W1067, W1068, W1069, W1070, W1071, W1072, W1073, W1074, W1075,
41
63
  W1076, W1077 and W9003 message definitions
42
64
 
43
- See the file
44
- {ChangeLog}[http://adlint.sourceforge.net/pmwiki/upload.d/Main/ChangeLog]
45
- for more details.
46
-
47
65
  === \AdLint 1.10.0 is released (2012-06-06)
48
66
 
49
67
  ==== Changes since the 1.8.10 release
@@ -36,7 +36,7 @@
36
36
  # X9999: "Your custom message for the fatal error of #9999."
37
37
  # E9999: "Your custom message for the error of #9999."
38
38
 
39
- version: "1.12.0"
39
+ version: "1.14.0"
40
40
 
41
41
  message_definition:
42
42
  X0001: "An unknown exception `%s' is found."
@@ -36,7 +36,7 @@
36
36
  # X9999: "Your custom message for the fatal error of #9999."
37
37
  # E9999: "Your custom message for the error of #9999."
38
38
 
39
- version: "1.12.0"
39
+ version: "1.14.0"
40
40
 
41
41
  message_definition:
42
42
  X0001: "不明な例外条件 `%s' を検出しました。"
@@ -3,7 +3,7 @@ Feature: W0093
3
3
  W0093 detects that a division-by-zero may occur.
4
4
 
5
5
  Scenario: narrowing denominator variable by an iteration controlling
6
- variable which has same value domain of the denominator.
6
+ variable which has same value domain of the denominator
7
7
  Given a target source named "W0093.c" with:
8
8
  """
9
9
  static void foo(void)
@@ -31,7 +31,7 @@ Feature: W0093
31
31
  | W0628 | 1 | 13 |
32
32
 
33
33
  Scenario: narrowing denominator variable by an iteration controlling
34
- variable which has narrower value domain than the denominator.
34
+ variable which has narrower value domain than the denominator
35
35
  Given a target source named "W0093.c" with:
36
36
  """
37
37
  static void foo(void)
@@ -58,7 +58,7 @@ Feature: W0093
58
58
  | W0628 | 1 | 13 |
59
59
 
60
60
  Scenario: narrowing denominator variable by an iteration controlling
61
- variable which has narrower value domain contains zero.
61
+ variable which has narrower value domain contains zero
62
62
  Given a target source named "W0093.c" with:
63
63
  """
64
64
  static void foo(void)
@@ -0,0 +1,111 @@
1
+ Feature: W0104
2
+
3
+ W0104 detects that a non-const parameter is never changed in the function.
4
+
5
+ Scenario: unchanged non-const parameter
6
+ Given a target source named "W0104.c" with:
7
+ """
8
+ static int func(int i) /* W0104 */
9
+ {
10
+ return i + 1;
11
+ }
12
+ """
13
+ When I successfully run `adlint W0104.c` on noarch
14
+ Then the output should exactly match with:
15
+ | mesg | line | column |
16
+ | W0723 | 3 | 14 |
17
+ | W0104 | 1 | 21 |
18
+ | W0629 | 1 | 12 |
19
+ | W0628 | 1 | 12 |
20
+
21
+ Scenario: unchanged prefixed const parameter
22
+ Given a target source named "W0104.c" with:
23
+ """
24
+ static int func(const int i) /* OK */
25
+ {
26
+ return i + 1;
27
+ }
28
+ """
29
+ When I successfully run `adlint W0104.c` on noarch
30
+ Then the output should exactly match with:
31
+ | mesg | line | column |
32
+ | W0723 | 3 | 14 |
33
+ | W0629 | 1 | 12 |
34
+ | W0628 | 1 | 12 |
35
+
36
+ Scenario: unchanged postfixed const parameter
37
+ Given a target source named "W0104.c" with:
38
+ """
39
+ static int func(int const i) /* OK */
40
+ {
41
+ return i + 1;
42
+ }
43
+ """
44
+ When I successfully run `adlint W0104.c` on noarch
45
+ Then the output should exactly match with:
46
+ | mesg | line | column |
47
+ | W0723 | 3 | 14 |
48
+ | W0629 | 1 | 12 |
49
+ | W0628 | 1 | 12 |
50
+
51
+ Scenario: unchanged prefixed const volatile parameter
52
+ Given a target source named "W0104.c" with:
53
+ """
54
+ static int func(const volatile int i) /* OK */
55
+ {
56
+ return i + 1;
57
+ }
58
+ """
59
+ When I successfully run `adlint W0104.c` on noarch
60
+ Then the output should exactly match with:
61
+ | mesg | line | column |
62
+ | W0723 | 3 | 14 |
63
+ | W0629 | 1 | 12 |
64
+ | W0628 | 1 | 12 |
65
+
66
+ Scenario: unchanged prefixed volatile const parameter
67
+ Given a target source named "W0104.c" with:
68
+ """
69
+ static int func(volatile const int i) /* OK */
70
+ {
71
+ return i + 1;
72
+ }
73
+ """
74
+ When I successfully run `adlint W0104.c` on noarch
75
+ Then the output should exactly match with:
76
+ | mesg | line | column |
77
+ | W0723 | 3 | 14 |
78
+ | W0629 | 1 | 12 |
79
+ | W0628 | 1 | 12 |
80
+
81
+ Scenario: unchanged mixfixed const volatile parameter
82
+ Given a target source named "W0104.c" with:
83
+ """
84
+ static int func(const int volatile i) /* OK */
85
+ {
86
+ return i + 1;
87
+ }
88
+ """
89
+ When I successfully run `adlint W0104.c` on noarch
90
+ Then the output should exactly match with:
91
+ | mesg | line | column |
92
+ | W0723 | 3 | 14 |
93
+ | W0629 | 1 | 12 |
94
+ | W0628 | 1 | 12 |
95
+
96
+ Scenario: unchanged mixfixed volatile const parameter
97
+ Given a target source named "W0104.c" with:
98
+ """
99
+ static int func(volatile int const i) /* OK */
100
+ {
101
+ return i + 1;
102
+ }
103
+ """
104
+ When I successfully run `adlint W0104.c` on noarch
105
+ Then the output should exactly match with:
106
+ | mesg | line | column |
107
+ | W0723 | 3 | 14 |
108
+ | W0629 | 1 | 12 |
109
+ | W0628 | 1 | 12 |
110
+
111
+ # vim:ts=2:sw=2:sts=2:et:
@@ -2,7 +2,7 @@ Feature: W0606
2
2
 
3
3
  W0606 detects that floating point in union.
4
4
 
5
- Scenario: floating point in union.
5
+ Scenario: floating point in union
6
6
  Given a target source named "W0606.c" with:
7
7
  """
8
8
  union UNI { /* W0606 */
@@ -0,0 +1,142 @@
1
+ Feature: W0645
2
+
3
+ W0645 detects that a function parameter is typed as `void'.
4
+
5
+ Scenario: a `void' parameter of a `void' function
6
+ Given a target source named "W0645.c" with:
7
+ """
8
+ extern void func(a) /* W0645 */
9
+ void a;
10
+ {
11
+ }
12
+ """
13
+ When I successfully run `adlint W0645.c` on noarch
14
+ Then the output should exactly match with:
15
+ | mesg | line | column |
16
+ | W0117 | 1 | 13 |
17
+ | W0031 | 2 | 6 |
18
+ | W0104 | 2 | 6 |
19
+ | W0002 | 1 | 13 |
20
+ | W0645 | 1 | 13 |
21
+ | W0628 | 1 | 13 |
22
+
23
+ Scenario: a `void' parameter of a `int' function
24
+ Given a target source named "W0645.c" with:
25
+ """
26
+ extern int func(a) /* W0645 */
27
+ void a;
28
+ {
29
+ return 0;
30
+ }
31
+ """
32
+ When I successfully run `adlint W0645.c` on noarch
33
+ Then the output should exactly match with:
34
+ | mesg | line | column |
35
+ | W0117 | 1 | 12 |
36
+ | W0031 | 2 | 6 |
37
+ | W0104 | 2 | 6 |
38
+ | W0002 | 1 | 12 |
39
+ | W0645 | 1 | 12 |
40
+ | W0628 | 1 | 12 |
41
+
42
+ Scenario: multiple parameters including `void' typed one
43
+ Given a target source named "W0645.c" with:
44
+ """
45
+ extern void func(a, b) /* W0645 */
46
+ int a;
47
+ void b;
48
+ {
49
+ }
50
+ """
51
+ When I successfully run `adlint W0645.c` on noarch
52
+ Then the output should exactly match with:
53
+ | mesg | line | column |
54
+ | W0117 | 1 | 13 |
55
+ | W0031 | 2 | 5 |
56
+ | W0031 | 3 | 6 |
57
+ | W0104 | 2 | 5 |
58
+ | W0104 | 3 | 6 |
59
+ | W0002 | 1 | 13 |
60
+ | W0645 | 1 | 13 |
61
+ | W0628 | 1 | 13 |
62
+
63
+ Scenario: a `void *' parameter
64
+ Given a target source named "W0645.c" with:
65
+ """
66
+ extern void func(p) /* OK */
67
+ void* p;
68
+ {
69
+ }
70
+ """
71
+ When I successfully run `adlint W0645.c` on noarch
72
+ Then the output should exactly match with:
73
+ | mesg | line | column |
74
+ | W0117 | 1 | 13 |
75
+ | W0031 | 2 | 7 |
76
+ | W0104 | 2 | 7 |
77
+ | W0105 | 2 | 7 |
78
+ | W0002 | 1 | 13 |
79
+ | W0628 | 1 | 13 |
80
+
81
+ Scenario: an `int' parameter
82
+ Given a target source named "W0645.c" with:
83
+ """
84
+ extern void func(a) /* OK */
85
+ int a;
86
+ {
87
+ }
88
+ """
89
+ When I successfully run `adlint W0645.c` on noarch
90
+ Then the output should exactly match with:
91
+ | mesg | line | column |
92
+ | W0117 | 1 | 13 |
93
+ | W0031 | 2 | 5 |
94
+ | W0104 | 2 | 5 |
95
+ | W0002 | 1 | 13 |
96
+ | W0628 | 1 | 13 |
97
+
98
+ Scenario: a `void' as a parameter-type-list
99
+ Given a target source named "W0645.c" with:
100
+ """
101
+ extern void func(void); /* OK */
102
+ """
103
+ When I successfully run `adlint W0645.c` on noarch
104
+ Then the output should exactly match with:
105
+ | mesg | line | column |
106
+ | W0118 | 1 | 13 |
107
+
108
+ Scenario: a qualified `void' parameter
109
+ Given a target source named "W0645.c" with:
110
+ """
111
+ extern void func(a) /* W0645 */
112
+ const void a;
113
+ {
114
+ }
115
+ """
116
+ When I successfully run `adlint W0645.c` on noarch
117
+ Then the output should exactly match with:
118
+ | mesg | line | column |
119
+ | W0117 | 1 | 13 |
120
+ | W0031 | 2 | 12 |
121
+ | W0002 | 1 | 13 |
122
+ | W0645 | 1 | 13 |
123
+ | W0628 | 1 | 13 |
124
+
125
+ Scenario: a more qualified `void' parameter
126
+ Given a target source named "W0645.c" with:
127
+ """
128
+ extern void func(a) /* W0645 */
129
+ const volatile void a;
130
+ {
131
+ }
132
+ """
133
+ When I successfully run `adlint W0645.c` on noarch
134
+ Then the output should exactly match with:
135
+ | mesg | line | column |
136
+ | W0117 | 1 | 13 |
137
+ | W0031 | 2 | 21 |
138
+ | W0002 | 1 | 13 |
139
+ | W0645 | 1 | 13 |
140
+ | W0628 | 1 | 13 |
141
+
142
+ # vim:ts=2:sw=2:sts=2:et: