forked from QuantumLeaps/qpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathau-misra2.lnt
1689 lines (1348 loc) · 58.2 KB
/
au-misra2.lnt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* Date Stamp */ -d"_lint_au_misra2_lnt=au-misra2.lnt modified 13-Jun-2014"
/* To document usage use: -message( "Using " _lint_au_misra2_lnt ) */
// ---------------------------------------------------------------------
// This file is provided by Gimpel Software (www.gimpel.com) for use with
// its products PC-lint and FlexeLint.
//
// Redistribution and use of this file, with or without modification, is
// permitted provided that any such redistribution retains this notice.
// ---------------------------------------------------------------------
// au-misra2.lnt -- Author options - MISRA C 2004
/*
This options file can be used to explicitly activate those
checks advocated by the Motor Industry Software Reliability
Association.
You can use this file directly when linting your programs as in:
lin au-misra2 files
Gimpel Software relies on the document, "MISRA-C:2004
Guidelines for the use of the C language in critical systems",
copyright 2004 by MIRA Limited, as the primary source for this
file. Gimpel Software makes no warranty as to the completeness
or applicability of this options file and reserves the right to
amend or alter the official contents of such at any time.
"MISRA" is a registered trademark of MIRA Limited, held on
behalf of the MISRA Consortium.
*/
-misra(2)
+e960 /* enable special MISRA 2 messages */
+elib(960)
+e961 /* enable special MISRA 2 messages */
+elib(961)
/* Rule 1.1 (req) **********************************/
-A(C90) /* strict ANSI */
+e950 /* flag non-ANSI word or construct */
+elib(950)
-append(950,[MISRA 2004 Rule 1.1, required])
/* Rule 1.2 (req) **********************************/
/* Avoid the use of undefined or unspecified behavior as described
in ISO C, Appendix A.6.1 and Appendix A.6.2 */
/* Source file not ending in a new-line character, ending in
new-line character immediately preceded by a backslash
character, or ending in a partial preprocessing token or
comment (ISO C, Appendix A.6.2, point 1).
*/
+e406 /* unclosed comment */
+elib(406)
-append(406,[MISRA 2004 Rule 1.2, required])
/* Non-standard character usage (ISO C, Appendix A.6.2, point 2).
*/
+e27 /* illegal character */
+elib(27)
-append(27,[MISRA 2004 Rule 1.2, required])
/* Unclosed quotes (ISO C, Appendix A.6.2, point 4).
*/
+e2 /* unclose quote */
+elib(2)
-append(2,[MISRA 2004 Rule 1.2, required])
/* Repeated label within a function (ISO C, Appendix A.6.2, point
5).
*/
+e31 /* symbol redefinition */
+elib(31)
-append(31,[MISRA 2004 Rule 1.2, required])
/* Non-visible identifier used (ISO C, Appendix A.6.2, point 6).
*/
+e40 /* undeclared identifier */
+elib(40)
-append(40,[MISRA 2004 Rule 1.2, required])
/* Identifiers for the same entity differ beyond the minimal
significant characters (ISO C, Appendix A.6.2, point 7).
See Rules 1.4 and 5.1
*/
/* The same identifier has both internal and external linkage in
the same translation unit (ISO C, Appendix A.6.2, point 8).
*/
+e401 /* symbol not previously declared static */
+elib(401)
-append(401,[MISRA 2004 Rule 1.2, required])
/* Multiple definitions for the same externally linked identifier
(ISO C, Appendix A.6.2, point 9).
*/
+e31 /* symbol redefinition */
+elib(31)
/* Using automatic storage data via a pointer after the data's
lifetime (ISO C, Appendix A.6.2, point 10).
*/
+e604 /* returning address of auto variable */
+elib(604)
-append(604,[MISRA 2004 Rule 1.2, required])
+e934 /* taking address of near auto variable */
+elib(934)
-append(934,[MISRA 2004 Rule 1.2, required])
/* Incompatible redeclarations (ISO C, Appendix A.6.2, point 11).
See Rule 8.3
*/
/* Non-standard escape sequence (ISO C, Appendix A.6.2, point 12).
See Rule 4.1
*/
/* Non-standard character in header name (ISO C, Appendix A.6.2,
point 15).
See Rule 19.2
*/
/* No complete type available (ISO C, Appendix A.6.2, point 16).
*/
+e86 /* structure has no data elements */
+elib(86)
-append(86,[MISRA 2004 Rule 1.2, required])
/* Using or converting a void expression (ISO C, Appendix A.6.2,
point 17).
*/
+e64 /* type mismatch */
+elib(64)
-append(64,[MISRA 2004 Rule 1.2, required])
+e67 /* cannot cast between types */
+elib(67)
-append(67,[MISRA 2004 Rule 1.2, required])
+e144 /* non-existent return value */
+elib(144)
-append(144,[MISRA 2004 Rule 1.2, required])
/* Modifying an object more than once or modifying and accessing
between two sequence points (ISO C, Appendix A.6.2, point 18).
See Rule 12.2
*/
/* Invalid arithmetic operations or unrepresentable results
(ISO C, Appendix A.6.2, point 19).
*/
+e54 /* division by 0 */
+elib(54)
-append(54,[MISRA 2004 Rule 1.2, required])
+e414 /* possible division by 0 */
+elib(414)
-append(414,[MISRA 2004 Rule 1.2, required])
+e795 /* conceivable division by 0 */
+elib(795)
-append(795,[MISRA 2004 Rule 1.2, required])
/* Also, see Rule 12.11 */
/* Passing a void argument to a function (ISO C, Appendix A.6.2,
point 20).
*/
+e64 /* type mismatch */
+elib(64)
/* Incompatible function redeclaration (ISO C, Appendix A.6.2,
point 22).
See Rule 8.3
*/
/* An invalid array reference, null pointer reference, or
reference to an object declared with automatic storage duration in
a terminated block occurs (ISO C, Appendix A.6.2, point 24).
*/
+e64 /* type mismatch */
+elib(64)
+e413 /* likely use of null pointer */
+elib(413)
-append(413,[MISRA 2004 Rule 1.2, required])
+e415 /* out-of-bounds pointer */
+elib(415)
-append(415,[MISRA 2004 Rule 1.2, required])
+e416 /* out-of-bounds pointer */
+elib(416)
-append(416,[MISRA 2004 Rule 1.2, required])
+e428 /* negative subscript */
+elib(428)
-append(428,[MISRA 2004 Rule 1.2, required])
/* Also, see Rule 17.6 */
/* A pointer to a function is converted to a pointer to an object
or a pointer to an object is converted to a pointer to a function
(ISO C, Appendix A.6.2, point 26).
*/
+e64 /* type mismatch */
+elib(64)
+e740 /* unusual pointer cast */
+elib(740)
-append(740,[MISRA 2004 Rule 1.2, required])
/* Also, see Rule 11.2 */
/* A pointer is converted to other than an integral or pointer
type (ISO C, Appendix A.6.2, point 27).
*/
+e64 /* type mismatch */
+elib(64)
+e71 /* cannot cast */
+elib(71)
+esym(920,pointer) /* cast to void */
-append(920,[MISRA 2004 Rule 1.2, required])
/* An expression is shifted by a negative number or by an amount
greater than or equal to the width in bits of the expression being
shifted (ISO C, Appendix A.6.2, point 30).
*/
+e504 /* unusual shift */
+elib(504)
-append(504,[MISRA 2004 Rule 1.2, required])
/* An identifier for an object is declared with no linkage and the
type of the object is incomplete after its declarator, or after its
init-declarator if it has an initializer (ISO C, Appendix
A.6.2, point 33).
*/
+e86 /* structure has no data elements */
+elib(86)
/* Declaring a function at block scope with a storage-class
specifier other than extern (ISO C, Appendix A.6.2, point 34).
*/
+e629 /* static class for function */
+elib(629)
-append(629,[MISRA 2004 Rule 1.2, required])
/* A bit-field is declared with a type other than int, signed int,
or unsigned int (ISO C, Appendix A.6.2, point 35).
See Rule 6.4
*/
/* Attempting to modify an object with const-qualified type by
means of an lvalue with non-const-qualified type (ISO C,
Appendix A.6.2, point 36).
*/
+e158 /* assignment increases capability */
+elib(158)
-append(158,[MISRA 2004 Rule 1.2, required])
/* Attempting to refer to an object with volatile-qualified type
by means of an lvalue with non-volatile-qualified type (ISO C,
Appendix A.6.2, point 37).
*/
+e158 /* assignment increases capability */
+elib(158)
/* Using the value of uninitialized automatic object (ISO C,
Appendix A.6.2, point 38).
See Rule 9.1
*/
/* An object with aggregate or union type with static storage
duration has a non-brace-enclosed initializer, or an object
with aggregate or union type with automatic storage duration
has either a single expression initializer with a type other
than that of the object or a non-brace-enclosed initializer
(ISO C, Appendix A.6.2, point 39).
Also, see Rule 9.2
*/
+e64 /* type mismatch */
+elib(64)
/* The value of a function is used, but no value was returned
(ISO C, Appendix A.6.2, point 40).
See Rule 16.8
*/
/* A function that accepts a variable number of arguments is
defined without a parameter type list that ends with the
ellipsis notation (ISO C, Appendix A.6.2, point 41).
See Rule 8.3
*/
/* An identifier for an object with internal linkage and an
incomplete type is declared with a tentative definition (ISO C,
Appendix A.6.2, point 42).
*/
+e86 /* structure has no data elements */
+elib(86)
/* Non-standard #include preprocessing directive (ISO C, Appendix
A.6.2, point 44).
See Rule 19.3
*/
/* Non-standard #line directive (ISO C, Appendix A.6.2, point 49).
*/
+"estring(10,a numeric constant)"
/* #defining or #undefing any of: defined, __LINE__, __FILE__,
__DATE__, __TIME__, or __STDC__ (ISO C, Appendix A.6.2, point 50).
*/
+e136 /* illegal macro name */
+elib(136)
-append(136,[MISRA 2004 Rule 1.2, required])
/* Format-argument mismatch in an fprintf or fscanf type of
function (ISO C, Appendix A.6.2, point 75).
*/
+e558 /* too few arguments */
+elib(558)
-append(558,[MISRA 2004 Rule 1.2, required])
+e719 /* too many arguments */
+elib(719)
-append(719,[MISRA 2004 Rule 1.2, required])
/* A %% conversion specification for the fprintf or fscanf
function contains characters between the pair of % characters
(ISO C, Appendix A.6.2, point 77).
*/
+e557 /* unrecognized format */
+elib(557)
-append(557,[MISRA 2004 Rule 1.2, required])
/* An aggregate or union, or a pointer to an aggregate or union is
an argument to the fprintf function, except for the conversion
specifiers %s (for an array of character type) or %p (for a pointer
to void) (ISO C, Appendix A.6.2, point 81).
*/
+e437 /* passing struct to ellipsis */
+elib(437)
-append(437,[MISRA 2004 Rule 1.2, required])
/* Referring to deallocated space (ISO C, Appendix A.6.2, point
87).
*/
+e449 /* previously deallocated pointer */
+elib(449)
-append(449,[MISRA 2004 Rule 1.2, required])
/* Misuse of free or realloc (ISO C, Appendix A.6.2, point 88).
*/
+esym(424,free) /* inappropriate deallocation */
-append(424,[MISRA 2004 Rule 1.2, required])
/* An array written to by a copying or concatenation function is
too small (ISO C, Appendix A.6.2, point 91).
*/
+e419 /* data overrun */
+elib(419)
-append(419,[MISRA 2004 Rule 1.2, required])
/* Order of evaluation (ISO C, Appendix A.6.1, point 7).
*/
+e564 /* variable depends on order of evaluation */
+elib(564)
-append(564,[MISRA 2004 Rule 1.2, required])
/* Side effects order (ISO C, Appendix A.6.1, point 8).
*/
+e931 /* both sides of an expression have side-effects */
+elib(931)
-append(931,[MISRA 2004 Rule 1.2, required])
/* Function argument evaluation (ISO C, Appendix A.6.1, point 9).
*/
+e564 /* variable depends on order of evaluation */
+elib(564)
/* The order in which # and ## operations are evaluated during
macro substitution (ISO C, Appendix A.6.1, point 12).
*/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 19.12,
multiple use of '#/##' operators in macro definition
*/
/* Whether setjmp is a macro or an external identifier (ISO C,
Appendix A.6.1, point 14).
See Rule 20.1
*/
/* Rule 1.3 (req) **********************************/
/* This is an environmental requirement on inter-language
interfacing and is not statically checkable
*/
/* Rule 1.4 (req) **********************************/
-idlen(31) /* flag names identical in the first 31 characters */
+e621 /* Identifier clash - length set by -idlen */
+elib(621)
-append(621,[MISRA 2004 Rule 1.4, required])
/* Rule 1.5 (adv) **********************************/
/* This is an environmental requirement involving the floating
point hardware and is not statically checkable
*/
/* Rule 2.1 (req) **********************************/
+e586 /* to activate the deprecation message */
+elib(586)
-deprecate(keyword,asm,[MISRA 2004 Rule 2.1, required])
/* Rule 2.2 (req) **********************************/
-A(C90) /* strict ANSI */
+e950 /* flag non-ANSI word or construct */
+elib(950)
-append(950,[MISRA 2004 Rule 2.2, required])
/* Rule 2.3 (req) **********************************/
-fnc /* flag nested comments */
+e602 /* comment within comment */
+elib(602)
-append(602,[MISRA 2004 Rule 2.3, required])
/* Rule 2.4 (adv) **********************************/
/* This requirement (that there be no commented-out code) is, in
principle, not statically checkable. The reason given for the
requirement is that comments do not nest. Thus a commented
out section of code that happens to use slash-star commenting
could inadvertently introduce unwanted code. Rule 2.3, however,
addresses the nested comment issue and hence the major concern
that this requirement seeks to address is indeed checkable.
*/
-fnc /* flag nested comments */
+e602 /* comment within comment */
+elib(602)
-append(602,[MISRA 2004 Rule 2.4, advisory])
/* Rule 3.1 (req) **********************************/
/* This is a documentation requirement and as such is not statically
checkable.
*/
/* Rule 3.2 (req) **********************************/
/* As stated in the description of the requirement, this is a
documentation requirement denoting the characters that may be
placed in string and character literals. It is not statically
checkable.
*/
/* Rule 3.3 (adv) **********************************/
/* This is a requirement on the hardware implementation of
integer division and/or the program's understanding of it.
It is not statically checkable.
*/
/* Rule 3.4 (req) **********************************/
/* This rule requires that all uses of the pragma directive
be documented. To assist in this documentation
effort we can report on unknown pragmas. By default, all
pragmas are unknown except two, push_macro and pop_macro.
These have been approved by the C standards committee but
nonetheless may be disabled (and thus reported upon as unknown)
by use of the -pragma option. These and other pragmas can be
later added using the +pragma option.
*/
+e975 /* report on unknown macros */
-pragma( push_macro ) /* disable push_macro */
-pragma( pop_macro ) /* disable pop_macro */
-append(975,[MISRA 2004 Rule 3.4, required])
/* Rule 3.5 (req) **********************************/
/* This rule is a documentation requirement when bit fields
are being used. As such, it is not statically checkable.
*/
/* Rule 3.6 (req) **********************************/
/* PC-lint and FlexeLint analyze auto-generated code in precisely
the same manner as non-auto-generated code.
*/
/* Rule 4.1 (req) **********************************/
+e606 /* non-ANSI escape sequence */
+elib(606)
-append(606,[MISRA 2004 Rule 4.1, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 4.1,
Prohibited escape sequence used
*/
/* Rule 4.2 (req) **********************************/
-ftg /* inhibit use of trigraphs */
+e584 /* activate trigraph detected message */
+elib(584)
-append(584,[MISRA 2004 Rule 4.2, required])
+e739 /* activate trigraph in string message */
+elib(739)
-append(739,[MISRA 2004 Rule 4.2, required])
/* Rule 5.1 (req) **********************************/
-idlen(31) /* flag names identical in the first 31 characters */
+e621 /* Identifier clash - length set by -idlen */
+elib(621)
-append(621,[MISRA 2004 Rule 5.1, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 5.1,
Identifier exceeds 31 characters
*/
/* Rule 5.2 (req) **********************************/
+e578 /* enable reports of name hiding */
+elib(578)
-append(578,[MISRA 2004 Rule 5.2, required])
/* Rule 5.3 (req) **********************************/
+e578 /* enable reports of name hiding */
+elib(578)
-append(578,[MISRA 2004 Rule 5.3, required])
+e623 /* redefining the storage class of symbol */
+elib(623)
-append(623,[MISRA 2004 Rule 5.3, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 5.3,
Typedef is not a unique declarator.
*/
/* Rule 5.4 (req) **********************************/
+e578 /* Declaration of Symbol hides Symbol */
+elib(578)
-append(578,[MISRA 2004 Rule 5.4, required])
+e14 /* Symbol previously defined */
+elib(14)
-append(14,[MISRA 2004 Rule 5.4, required])
+e15 /* Symbol redeclared */
+elib(15)
-append(15,[MISRA 2004 Rule 5.4, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 5.4,
Tag is not a unique declarator
*/
/* Rule 5.5 (adv) **********************************/
+e578 /* Declaration of Symbol hides Symbol */
+elib(578)
-append(578,[MISRA 2004 Rule 5.5, advisory])
+e580 /* enable reports of name hiding */
+elib(580)
-append(580,[MISRA 2004 Rule 5.5, advisory])
/* we generate note 961 as follows:
Note 961: Violates MISRA 2004 Advisory Rule 5.5,
Identifier with static storage is reused.
*/
/* Rule 5.6 (adv) **********************************/
+e578 /* enable reports of name hiding */
+elib(578)
-append(578,[MISRA 2004 Rule 5.6, advisory])
+e580 /* enable reports of name hiding */
+elib(580)
-append(580,[MISRA 2004 Rule 5.6, advisory])
/* Rule 5.7 (adv) **********************************/
+e578 /* enable reports of name hiding */
+elib(578)
-append(578,[MISRA 2004 Rule 5.7, advisory])
+e580 /* enable reports of name hiding */
+elib(580)
-append(580,[MISRA 2004 Rule 5.7, advisory])
/* Rule 6.1 (req) **********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 6.1,
Disallowed use of non-character value, or
Plain char mixed with type other than plain char, or
Plain char used with prohibited operator, or
Disallowed cast of plain char
*/
/* Rule 6.2 (req) **********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 6.2,
Disallowed use of non-numeric value
*/
/* Rule 6.3 (adv) **********************************/
+e970 /* flag modifiers used outside of typedefs */
+elib(970)
-append(970,[MISRA 2004 Rule 6.3, advisory])
// For the duration, we are presuming MISRA does not want
// diagnostics for the bool type.
-esym(970,bool)
/* Rule 6.4 (req) **********************************/
+e46 /* field type should be int */
+elib(46)
-append(46,[MISRA 2004 Rule 6.4, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 6.4,
Bit field must be explicitly signed int or unsigned int
*/
/* Rule 6.5 (req) **********************************/
+e806 /* small bit field is signed rather than unsigned */
+elib(806)
-append(806,[MISRA 2004 Rule 6.5, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 6.5,
Signed bit field is too small
*/
/* Rule 7.1 (req) **********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 7.1,
Octal constant or octal escape sequence used
*/
/* Rule 8.1 (req) **********************************/
+e718 /* Symbol undeclared */
+elib(718)
-append(718,[MISRA 2004 Rule 8.1, required])
+e746 /* Call to function not made in the
presence of a prototype
*/
+elib(746)
-append(746,[MISRA 2004 Rule 8.1, required])
+e937 /* old-style function declaration */
+elib(937)
-append(937,[MISRA 2004 Rule 8.1, required])
+e957 /* function defined without a prototype
in scope
*/
+elib(957)
-append(957,[MISRA 2004 Rule 8.1, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 8.1,
no prototype for function
*/
/* Rule 8.2 (req) **********************************/
+e601 /* object has no explicit type */
+elib(601)
-append(601,[MISRA 2004 Rule 8.2, required])
+e808 /* object type defaults to int */
+elib(808)
-append(808,[MISRA 2004 Rule 8.2, required])
+e745 /* function has no explicit type */
+elib(745)
-append(745,[MISRA 2004 Rule 8.2, required])
+e939 /* return type defaults to int */
+elib(939)
-append(939,[MISRA 2004 Rule 8.2, required])
/* Rule 8.3 (req) **********************************/
-fvr /* varying return mode not allowed */
-strong() /* enable strong typing for
declarations */
+e18 /* symbol redeclared */
+elib(18)
-append(18,[Encompasses MISRA 2004 Rule 8.3, required])
+e516 /* argument type conflict */
+elib(516)
-append(516,[MISRA 2004 Rule 8.3, required])
+e532 /* return mode of symbol inconsistent */
+elib(532)
-append(532,[MISRA 2004 Rule 8.3, required])
/* Rule 8.4 (req) **********************************/
+e15 /* symbol redeclared */
+elib(15)
-append(15,[MISRA 2004 Rule 8.4, required])
+e18 /* symbol redeclared */
+elib(18)
-append(18,[Encompasses MISRA 2004 Rule 8.4, required])
+e64 /* flag type mismatch */
+elib(64)
-append(64,[MISRA 2004 Rule 8.4, required])
/* Rule 8.5 (req) **********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 8.5,
no object/function definitions in header files
*/
/* Rule 8.6 (req) **********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 8.6,
function not declared at file scope
*/
/* Rule 8.7 (req) **********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 8.7,
Could define variable at block scope
*/
/* Rule 8.8 (req) **********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 8.8,
Object/function previously declared in location
*/
/* Rule 8.9 (req) **********************************/
+e14 /* Symbol previously defined */
+elib(14)
-append(14,[MISRA 2004 Rule 8.9, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 8.9,
undefined symbol
*/
/* Rule 8.10 (req) *********************************/
+e765 /* symbol could be made static */
+elib(765)
-append(765,[MISRA 2004 Rule 8.10, required])
/* Rule 8.11 (req) *********************************/
+e401 /* symbol not previously declared static */
+elib(401)
-append(401,[MISRA 2004 Rule 8.11, required])
+e512 /* symbol previously used as static */
+elib(512)
-append(512,[MISRA 2004 Rule 8.11, required])
+e839 /* symbol previously declared as static */
+elib(839)
-append(839,[MISRA 2004 Rule 8.11, required])
/* Rule 8.12 (req) *********************************/
+e85 /* Array has 0 dimension */
+elib(85)
-append(85,[MISRA 2004 Rule 8.12, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 8.12,
extern array declared without size or initializer
*/
/* Rule 9.1 (req) **********************************/
+e644 /* Symbol may not have been initialized */
+elib(644)
-append(644,[MISRA 2004 Rule 9.1, required])
+e771 /* Symbol conceivably not initialized */
+elib(771)
-append(771,[MISRA 2004 Rule 9.1, required])
+e530 /* Symbol not initialized */
+elib(530)
-append(530,[MISRA 2004 Rule 9.1, required])
/* Rule 9.2 (req) **********************************/
+e785 /* too few initializers for aggregate */
+elib(785)
-append(785,[MISRA 2004 Rule 9.2, required])
+e940 /* omitted braces within an initializer */
+elib(940)
-append(940,[MISRA 2004 Rule 9.2, required])
/* Rule 9.3 (req) **********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 9.3,
should initialize either all enum members or only the first
*/
/* Rule 10.1 (req) *********************************/
+e524 /* loss of precision */
+elib(524)
-append(524,[MISRA 2004 Rule 10.1])
+e653 /* possible loss of fraction */
+elib(653)
-append(653,[MISRA 2004 Rule 10.1, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 10.1,
Prohibited Implicit Conversion, or
Implicit conversion from integer to floating point type, or
Implicit conversion of integer to smaller type, or
Implicit conversion changes signedness, or
Implicit conversion of complex integer expression
*/
/* Rule 10.2 (req) *********************************/
+e747 /* significant prototype coercion */
+elib(747)
-append(747,[MISRA 2004 Rule 10.2, required])
+e918 /* prototype coercion of pointers */
+elib(918)
-append(918,[MISRA 2004 Rule 10.2, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 10.2,
Prohibited Implicit Conversion, or
Implicit conversion from floating point to integer type, or
Implicit conversion of floating point to smaller type, or
Implicit conversion of complex floating point expression
*/
/* Rule 10.3 (req) *********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 10.3,
Prohibited cast of complex integer expression
*/
/* Rule 10.4 (req) *********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 10.4,
Prohibited cast of complex floating-point expression: Casting
to larger type
*/
/* Rule 10.5 (req) *********************************/
+e701 /* shift left of signed quantity */
+elib(701)
-append(701,[MISRA 2004 Rule 10.5, required])
+e702 /* shift right of signed quantity */
+elib(702)
-append(702,[MISRA 2004 Rule 10.5, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 10.5,
Operators '~' and '<<' require recasting to underlying type for
sub-integers
*/
/* Rule 10.6 (req) *********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 10.6,
Unsigned integer literals require a 'U' suffix
*/
/* Rule 11.1 (req) *********************************/
+esym(68,pointer) /* cannot cast to/from pointer */
-append(68,[MISRA 2004 Rule 11.1, required])
+esym(922,pointer) /* cast to/from pointer */
-append(922,[MISRA 2004 Rule 11.1, required])
+e923 /* cast pointer/non-pointer */
+elib(923)
-append(923,[Encompasses MISRA 2004 Rule 11.1, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 11.1,
Conversions involving function pointers must be to/from integral types
*/
/* Rule 11.2 (req) *********************************/
+esym(68,pointer) /* Cannot cast from pointer to float */
-append(68,[MISRA 2004 Rule 11.2, required])
+e71 /* Cannot cast between types */
+elib(71)
-append(71,[MISRA 2004 Rule 11.2, required])
+esym(920,pointer) /* cast to void */
-append(920,[MISRA 2004 Rule 11.2, required])
/* Rule 11.3 (adv) *********************************/
+e923 /* cast pointer/non-pointer */
+elib(923)
-append(923,[MISRA 2004 Rule 11.3, advisory])
/* Rule 11.4 (adv) *********************************/
+e926 /* cast from pointer to pointer */
+elib(926)
-append(926,[MISRA 2004 Rule 11.4, advisory])
+e927 /* cast from pointer to pointer */
+elib(927)
-append(927,[MISRA 2004 Rule 11.4, advisory])
+e928 /* cast from pointer to pointer */
+elib(928)
-append(928,[MISRA 2004 Rule 11.4, advisory])
+e929 /* cast from pointer to pointer */
+elib(929)
-append(929,[MISRA 2004 Rule 11.4, advisory])
/* Rule 11.5 (req) *********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 11.5,
Attempt to cast away const/volatile from a pointer or reference
*/
/* Rule 12.1 (adv) *********************************/
/* we generate note 961 as follows:
Note 961: Violates MISRA 2004 Advisory Rule 12.1,
dependence placed on C's operator precedence
*/
+e834 /* confusing operator sequence (same precedence) */
+elib(834)
-append(834,[MISRA 2004 Rule 12.1, advisory])
/* Rule 12.2 (req) *********************************/
+e564 /* order of evaluation */
+elib(564)
-append(564,[MISRA 2004 Rule 12.2, required])
+e864 /* order of evaluation */
+elib(864)
-append(864,[MISRA 2004 Rule 12.2, required])
+e931 /* order of evaluation */
+elib(931)
-append(931,[MISRA 2004 Rule 12.2, required])
/* Rule 12.3 (req) *********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 12.3,
'sizeof' used on expressions with side effect
*/
/* Rule 12.4 (req) *********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 12.4,
side effects on right hand side of logical operator
*/
/* Rule 12.5 (req) *********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 12.5,
Non-primary expression used with logical operator
*/
/* Rule 12.6 (adv) *********************************/
/* we generate note 961 as follows:
Note 961: Violates MISRA 2004 Advisory Rule 12.6,
Boolean expression used with non-permitted operator, or
Boolean expression required for operator
*/
/* Rule 12.7 (req) *********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 12.7,
Bitwise operator applied to signed underlying type
*/
/* Rule 12.8 (req) *********************************/
+e572 /* excessive shift value */
+elib(572)
-append(572,[MISRA 2004 Rule 12.8, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 12.8,
out of bounds value for right hand side of shift operator
*/
/* Rule 12.9 (req) *********************************/
+e501 /* expected signed type */
+elib(501)
-append(501,[MISRA 2004 Rule 12.9, required])
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 12.9,
Prohibited operator applied to unsigned underlying type
*/
/* Rule 12.10 (req) ********************************/
/* we generate note 960 as follows:
Note 960: Violates MISRA 2004 Required Rule 12.10,