adlint 1.10.0 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +197 -4
- data/MANIFEST +17 -0
- data/NEWS +23 -4
- data/etc/mesg.d/en_US/messages.yml +14 -1
- data/etc/mesg.d/ja_JP/messages.yml +14 -1
- data/features/message_detection/W0093.feature +87 -0
- data/features/message_detection/W0687.feature +25 -0
- data/features/message_detection/W0688.feature +63 -0
- data/features/message_detection/W0689.feature +46 -0
- data/features/message_detection/W0690.feature +35 -0
- data/features/message_detection/W0698.feature +3 -2
- data/features/message_detection/W0703.feature +1 -0
- data/features/message_detection/W0723.feature +34 -0
- data/features/message_detection/W0732.feature +158 -0
- data/features/message_detection/W0733.feature +158 -0
- data/features/message_detection/W0734.feature +322 -0
- data/features/message_detection/W0735.feature +322 -0
- data/features/message_detection/W1052.feature +66 -0
- data/features/message_detection/W9001.feature +33 -0
- data/features/message_detection/W9003.feature +131 -0
- data/lib/adlint/c/ctrlexpr.rb +51 -50
- data/lib/adlint/c/domain.rb +237 -223
- data/lib/adlint/c/expr.rb +6 -8
- data/lib/adlint/c/interp.rb +8 -11
- data/lib/adlint/c/message.rb +20 -0
- data/lib/adlint/c/message_shima.rb +63 -0
- data/lib/adlint/c/object.rb +5 -4
- data/lib/adlint/c/operator.rb +99 -0
- data/lib/adlint/c/parser.rb +2 -2
- data/lib/adlint/c/parser.y +2 -2
- data/lib/adlint/c/phase.rb +6 -1
- data/lib/adlint/c/syntax.rb +442 -30
- data/lib/adlint/c/type.rb +449 -363
- data/lib/adlint/c/value.rb +96 -25
- data/lib/adlint/c.rb +1 -0
- data/lib/adlint/prelude.rb +16 -18
- data/lib/adlint/version.rb +2 -2
- data/share/doc/developers_guide_ja.html +11 -5
- data/share/doc/developers_guide_ja.texi +9 -3
- data/share/doc/users_guide_en.html +697 -131
- data/share/doc/users_guide_en.texi +491 -41
- data/share/doc/users_guide_ja.html +709 -139
- data/share/doc/users_guide_ja.texi +499 -45
- data/spec/adlint/c/ctrlexpr_spec.rb +168 -0
- data/spec/adlint/c/domain_spec.rb +835 -0
- data/spec/adlint/c/operator_spec.rb +406 -0
- data/spec/adlint/c/syntax_spec.rb +717 -0
- data/spec/adlint/c/type_spec.rb +55 -30
- metadata +19 -2
@@ -2,7 +2,7 @@
|
|
2
2
|
@setfilename users_guide_en.info
|
3
3
|
@documentlanguage en
|
4
4
|
@documentencoding utf-8
|
5
|
-
@settitle AdLint 1.
|
5
|
+
@settitle AdLint 1.12.0 User's Guide
|
6
6
|
|
7
7
|
@copying
|
8
8
|
Copyright (C) 2010-2012, OGIS-RI Co.,Ltd.
|
@@ -2818,8 +2818,21 @@ context_line
|
|
2818
2818
|
* W1063::The return value returned from enumeration type function to non constant expression.
|
2819
2819
|
* W1064::A integer constant is used in switch statement where case label is enumeration type.
|
2820
2820
|
* W1065::A value of different enumeration type is used in switch statement where case label is an enumeration type.
|
2821
|
+
* W1066::A value of the `float' typed compound expression is explicitly converted into a `double' value.
|
2822
|
+
* W1067::A value of the `float' typed compound expression is explicitly converted into a `long double' value.
|
2823
|
+
* W1068::A value of the `double' typed compound expression is explicitly converted into a `long double' value.
|
2824
|
+
* W1069::No trailing `else' clause is found in this `if-else-if' statements chain.
|
2825
|
+
* W1070::This `switch' statement can be translated into `if-else' statement because there are only 2 execution paths.
|
2826
|
+
* W1071::Function `%s' has multiple termination points.
|
2827
|
+
* W1072::`A `goto' statement is found.
|
2828
|
+
* W1073::A return value of function `%s' is not used.。
|
2829
|
+
* W1074::Side-effects in `sizeof' operand will not be recorded because the operand will not be executed actually.
|
2830
|
+
* W1075::This declaration has no `static' storage-class-specifier while the declaring object has internal-linkage.
|
2831
|
+
* W1076::`%s' is defined as internal-linkage, but it has no forward declaration.
|
2832
|
+
* W1077::Declaring array object without a size.
|
2821
2833
|
* W9001::This statement doesn't reach the control.
|
2822
2834
|
* W9002::There is no line feed character at the end of file.
|
2835
|
+
* W9003::An object typed `%s' is implicitly converted into an object of other type.
|
2823
2836
|
* C0001::A warning is detected in external identifier name `%s'.
|
2824
2837
|
@end menu
|
2825
2838
|
|
@@ -28707,7 +28720,7 @@ A function-like macro is called by actual argument which its definition is small
|
|
28707
28720
|
|
28708
28721
|
@subsection Content
|
28709
28722
|
|
28710
|
-
@b{This message will be supported
|
28723
|
+
@b{This message will be supported after AdLint 2.0.0}
|
28711
28724
|
|
28712
28725
|
Under construction.
|
28713
28726
|
|
@@ -28725,7 +28738,7 @@ Under construction.
|
|
28725
28738
|
|
28726
28739
|
@subsection Since
|
28727
28740
|
|
28728
|
-
2.0.0 (planned)
|
28741
|
+
After 2.0.0 (planned)
|
28729
28742
|
|
28730
28743
|
@node W0694
|
28731
28744
|
@section W0694
|
@@ -29566,7 +29579,7 @@ An unrecognized preprocessing directive is ignored by conditional include direct
|
|
29566
29579
|
|
29567
29580
|
@subsection Content
|
29568
29581
|
|
29569
|
-
@b{This message will be supported
|
29582
|
+
@b{This message will be supported after AdLint 2.0.0}
|
29570
29583
|
|
29571
29584
|
Under construction.
|
29572
29585
|
|
@@ -29582,7 +29595,7 @@ None.
|
|
29582
29595
|
|
29583
29596
|
@subsection Since
|
29584
29597
|
|
29585
|
-
2.0.0 (planned)
|
29598
|
+
After 2.0.0 (planned)
|
29586
29599
|
|
29587
29600
|
@node W0726
|
29588
29601
|
@section W0726
|
@@ -29821,14 +29834,20 @@ Both operand of `&&'operator is bit operator or arithmetic operator.
|
|
29821
29834
|
|
29822
29835
|
@subsection Content
|
29823
29836
|
|
29824
|
-
@b{This message will be supported in AdLint 2.0.0}
|
29825
|
-
|
29826
29837
|
Under construction.
|
29827
29838
|
|
29828
29839
|
@subsection Sample code
|
29829
29840
|
|
29830
29841
|
@verbatim
|
29831
|
-
|
29842
|
+
extern void func(unsigned int a, unsigned int b,unsigned int c, unsigned int d)
|
29843
|
+
{
|
29844
|
+
int r;
|
29845
|
+
r = (a + b) && (c - d); /* W0732 */
|
29846
|
+
r = (a * b) && (c / d); /* W0732 */
|
29847
|
+
|
29848
|
+
r = (a << b) && (c << d); /* W0732 */
|
29849
|
+
r = (a >> b) && (c >> d); /* W0732 */
|
29850
|
+
}
|
29832
29851
|
@end verbatim
|
29833
29852
|
|
29834
29853
|
@subsection Related message
|
@@ -29841,7 +29860,7 @@ Under construction.
|
|
29841
29860
|
|
29842
29861
|
@subsection Since
|
29843
29862
|
|
29844
|
-
|
29863
|
+
1.12.0
|
29845
29864
|
|
29846
29865
|
@node W0733
|
29847
29866
|
@section W0733
|
@@ -29853,14 +29872,20 @@ Both operand of `||'operator is bit operator or arithmetic operator.
|
|
29853
29872
|
|
29854
29873
|
@subsection Content
|
29855
29874
|
|
29856
|
-
@b{This message will be supported in AdLint 2.0.0}
|
29857
|
-
|
29858
29875
|
Under construction.
|
29859
29876
|
|
29860
29877
|
@subsection Sample code
|
29861
29878
|
|
29862
29879
|
@verbatim
|
29863
|
-
|
29880
|
+
extern void func(unsigned int a, unsigned int b,unsigned int c, unsigned int d)
|
29881
|
+
{
|
29882
|
+
int r;
|
29883
|
+
r = (a + b) || (c - d); /* W0733 */
|
29884
|
+
r = (a * b) || (c / d); /* W0733 */
|
29885
|
+
|
29886
|
+
r = (a << b) || (c << d); /* W0733 */
|
29887
|
+
r = (a >> b) || (c >> d); /* W0733 */
|
29888
|
+
}
|
29864
29889
|
@end verbatim
|
29865
29890
|
|
29866
29891
|
@subsection Related message
|
@@ -29873,7 +29898,7 @@ Under construction.
|
|
29873
29898
|
|
29874
29899
|
@subsection Since
|
29875
29900
|
|
29876
|
-
|
29901
|
+
1.12.0
|
29877
29902
|
|
29878
29903
|
@node W0734
|
29879
29904
|
@section W0734
|
@@ -29885,14 +29910,20 @@ A left operand of logical operator is bit operator or arithmetic operator.
|
|
29885
29910
|
|
29886
29911
|
@subsection Content
|
29887
29912
|
|
29888
|
-
@b{This message will be supported in AdLint 2.0.0}
|
29889
|
-
|
29890
29913
|
Under construction.
|
29891
29914
|
|
29892
29915
|
@subsection Sample code
|
29893
29916
|
|
29894
29917
|
@verbatim
|
29895
|
-
|
29918
|
+
extern void func(unsigned int a, unsigned int b, unsigned int c)
|
29919
|
+
{
|
29920
|
+
int r;
|
29921
|
+
r = (a + b) && c; /* W0734 */
|
29922
|
+
r = (a - b) && c; /* W0734 */
|
29923
|
+
|
29924
|
+
r = (a << b) || c; /* W0734 */
|
29925
|
+
r = (a >> b) || c; /* W0734 */
|
29926
|
+
}
|
29896
29927
|
@end verbatim
|
29897
29928
|
|
29898
29929
|
@subsection Related message
|
@@ -29905,7 +29936,7 @@ Under construction.
|
|
29905
29936
|
|
29906
29937
|
@subsection Since
|
29907
29938
|
|
29908
|
-
|
29939
|
+
1.12.0
|
29909
29940
|
|
29910
29941
|
@node W0735
|
29911
29942
|
@section W0735
|
@@ -29917,14 +29948,20 @@ A right operand of logical operator is the expression of bit operator or arithme
|
|
29917
29948
|
|
29918
29949
|
@subsection Content
|
29919
29950
|
|
29920
|
-
@b{This message will be supported in AdLint 2.0.0}
|
29921
|
-
|
29922
29951
|
Under construction.
|
29923
29952
|
|
29924
29953
|
@subsection Sample code
|
29925
29954
|
|
29926
29955
|
@verbatim
|
29927
|
-
|
29956
|
+
extern void func(unsigned int a, unsigned int b, unsigned int c)
|
29957
|
+
{
|
29958
|
+
int r;
|
29959
|
+
r = a && (b + c); /* W0735 */
|
29960
|
+
r = a && (b - c); /* W0735 */
|
29961
|
+
|
29962
|
+
r = a || (b >> c); /* W0735 */
|
29963
|
+
r = a || (b << c); /* W0735 */
|
29964
|
+
}
|
29928
29965
|
@end verbatim
|
29929
29966
|
|
29930
29967
|
@subsection Related message
|
@@ -29937,7 +29974,7 @@ Under construction.
|
|
29937
29974
|
|
29938
29975
|
@subsection Since
|
29939
29976
|
|
29940
|
-
|
29977
|
+
1.12.0
|
29941
29978
|
|
29942
29979
|
@node W0736
|
29943
29980
|
@section W0736
|
@@ -31802,7 +31839,7 @@ The nonstandard escape sequence is used.
|
|
31802
31839
|
|
31803
31840
|
@subsection Content
|
31804
31841
|
|
31805
|
-
@b{This message will be supported
|
31842
|
+
@b{This message will be supported after AdLint 2.0.0}
|
31806
31843
|
|
31807
31844
|
Under construction.
|
31808
31845
|
|
@@ -31818,7 +31855,7 @@ None.
|
|
31818
31855
|
|
31819
31856
|
@subsection Since
|
31820
31857
|
|
31821
|
-
2.0.0 (planned)
|
31858
|
+
After 2.0.0 (planned)
|
31822
31859
|
|
31823
31860
|
@node W0785
|
31824
31861
|
@section W0785
|
@@ -32420,7 +32457,7 @@ A form of after `#include' preprocessing directive is not <file name> nor \"file
|
|
32420
32457
|
|
32421
32458
|
@subsection Content
|
32422
32459
|
|
32423
|
-
@b{This message will be supported
|
32460
|
+
@b{This message will be supported after AdLint 2.0.0}
|
32424
32461
|
|
32425
32462
|
Under construction.
|
32426
32463
|
|
@@ -32439,7 +32476,7 @@ None.
|
|
32439
32476
|
|
32440
32477
|
@subsection Since
|
32441
32478
|
|
32442
|
-
2.0.0 (planned)
|
32479
|
+
After 2.0.0 (planned)
|
32443
32480
|
|
32444
32481
|
@node W0803
|
32445
32482
|
@section W0803
|
@@ -32451,7 +32488,7 @@ A preprocessing directive is described in actual argument of function-like macro
|
|
32451
32488
|
|
32452
32489
|
@subsection Content
|
32453
32490
|
|
32454
|
-
@b{This message will be supported
|
32491
|
+
@b{This message will be supported after AdLint 2.0.0}
|
32455
32492
|
|
32456
32493
|
Under construction.
|
32457
32494
|
|
@@ -32467,7 +32504,7 @@ None.
|
|
32467
32504
|
|
32468
32505
|
@subsection Since
|
32469
32506
|
|
32470
|
-
2.0.0 (planned)
|
32507
|
+
After 2.0.0 (planned)
|
32471
32508
|
|
32472
32509
|
@node W0804
|
32473
32510
|
@section W0804
|
@@ -32957,7 +32994,7 @@ A macro which receives variable argument is defined.
|
|
32957
32994
|
|
32958
32995
|
@subsection Content
|
32959
32996
|
|
32960
|
-
@b{This message will be supported
|
32997
|
+
@b{This message will be supported after AdLint 2.0.0}
|
32961
32998
|
|
32962
32999
|
Under construction.
|
32963
33000
|
|
@@ -32973,7 +33010,7 @@ None.
|
|
32973
33010
|
|
32974
33011
|
@subsection Since
|
32975
33012
|
|
32976
|
-
2.0.0 (planned)
|
33013
|
+
After 2.0.0 (planned)
|
32977
33014
|
|
32978
33015
|
@node W0947
|
32979
33016
|
@section W0947
|
@@ -33394,7 +33431,7 @@ None.
|
|
33394
33431
|
|
33395
33432
|
@subsection Content
|
33396
33433
|
|
33397
|
-
@b{This message will be supported
|
33434
|
+
@b{This message will be supported after AdLint 2.0.0}
|
33398
33435
|
|
33399
33436
|
Under construction.
|
33400
33437
|
|
@@ -33412,7 +33449,7 @@ Under construction.
|
|
33412
33449
|
|
33413
33450
|
@subsection Since
|
33414
33451
|
|
33415
|
-
2.0.0 (planned)
|
33452
|
+
After 2.0.0 (planned)
|
33416
33453
|
|
33417
33454
|
@node W1036
|
33418
33455
|
@section W1036
|
@@ -33424,7 +33461,7 @@ Under construction.
|
|
33424
33461
|
|
33425
33462
|
@subsection Content
|
33426
33463
|
|
33427
|
-
@b{This message will be supported
|
33464
|
+
@b{This message will be supported after AdLint 2.0.0}
|
33428
33465
|
|
33429
33466
|
Under construction.
|
33430
33467
|
|
@@ -33442,7 +33479,7 @@ Under construction.
|
|
33442
33479
|
|
33443
33480
|
@subsection Since
|
33444
33481
|
|
33445
|
-
2.0.0 (planned)
|
33482
|
+
After 2.0.0 (planned)
|
33446
33483
|
|
33447
33484
|
@node W1037
|
33448
33485
|
@section W1037
|
@@ -33578,7 +33615,7 @@ Under construction.
|
|
33578
33615
|
|
33579
33616
|
@subsection Content
|
33580
33617
|
|
33581
|
-
@b{This message will be supported
|
33618
|
+
@b{This message will be supported after AdLint 2.0.0}
|
33582
33619
|
|
33583
33620
|
Under construction.
|
33584
33621
|
|
@@ -33597,7 +33634,7 @@ Under construction.
|
|
33597
33634
|
|
33598
33635
|
@subsection Since
|
33599
33636
|
|
33600
|
-
2.0.0 (planned)
|
33637
|
+
After 2.0.0 (planned)
|
33601
33638
|
|
33602
33639
|
@node W1043
|
33603
33640
|
@section W1043
|
@@ -33609,7 +33646,7 @@ Under construction.
|
|
33609
33646
|
|
33610
33647
|
@subsection Content
|
33611
33648
|
|
33612
|
-
@b{This message will be supported
|
33649
|
+
@b{This message will be supported after AdLint 2.0.0}
|
33613
33650
|
|
33614
33651
|
Under construction.
|
33615
33652
|
|
@@ -33628,7 +33665,7 @@ Under construction.
|
|
33628
33665
|
|
33629
33666
|
@subsection Since
|
33630
33667
|
|
33631
|
-
2.0.0 (planned)
|
33668
|
+
After 2.0.0 (planned)
|
33632
33669
|
|
33633
33670
|
@node W1044
|
33634
33671
|
@section W1044
|
@@ -33671,7 +33708,7 @@ This `@@ word' syntax will be ignored.
|
|
33671
33708
|
|
33672
33709
|
@subsection Content
|
33673
33710
|
|
33674
|
-
@b{This message will be supported
|
33711
|
+
@b{This message will be supported after AdLint 2.0.0}
|
33675
33712
|
|
33676
33713
|
Under construction.
|
33677
33714
|
|
@@ -33690,7 +33727,7 @@ Under construction.
|
|
33690
33727
|
|
33691
33728
|
@subsection Since
|
33692
33729
|
|
33693
|
-
2.0.0 (planned)
|
33730
|
+
After 2.0.0 (planned)
|
33694
33731
|
|
33695
33732
|
@node W1046
|
33696
33733
|
@section W1046
|
@@ -33758,7 +33795,7 @@ The multi byte string literal is an implementation defined value.
|
|
33758
33795
|
|
33759
33796
|
@subsection Content
|
33760
33797
|
|
33761
|
-
@b{This message will be supported
|
33798
|
+
@b{This message will be supported after AdLint 2.0.0}
|
33762
33799
|
|
33763
33800
|
Under construction.
|
33764
33801
|
|
@@ -33774,7 +33811,7 @@ None.
|
|
33774
33811
|
|
33775
33812
|
@subsection Since
|
33776
33813
|
|
33777
|
-
2.0.0 (planned)
|
33814
|
+
After 2.0.0 (planned)
|
33778
33815
|
|
33779
33816
|
@node W1049
|
33780
33817
|
@section W1049
|
@@ -34542,6 +34579,383 @@ int func(enum Color c)
|
|
34542
34579
|
|
34543
34580
|
1.4.0
|
34544
34581
|
|
34582
|
+
@node W1066
|
34583
|
+
@section W1066
|
34584
|
+
@cindex W1066
|
34585
|
+
|
34586
|
+
@subsection Message body
|
34587
|
+
|
34588
|
+
A value of the `float' typed compound expression is explicitly converted into a `double' value.
|
34589
|
+
|
34590
|
+
@subsection Content
|
34591
|
+
|
34592
|
+
@b{This message will be supported in AdLint 2.0.0}
|
34593
|
+
|
34594
|
+
Under construction.
|
34595
|
+
|
34596
|
+
@subsection Sample code
|
34597
|
+
|
34598
|
+
@verbatim
|
34599
|
+
void func(float a)
|
34600
|
+
{
|
34601
|
+
double b = (double) (a * a);
|
34602
|
+
}
|
34603
|
+
@end verbatim
|
34604
|
+
|
34605
|
+
@subsection Related message
|
34606
|
+
|
34607
|
+
@itemize
|
34608
|
+
@item @ref{W1067} A value of the `float' typed compound expression is explicitly converted into a `long double' value.
|
34609
|
+
@item @ref{W1068} A value of the `double' typed compound expression is explicitly converted into a `long double' value.
|
34610
|
+
@end itemize
|
34611
|
+
|
34612
|
+
@subsection Since
|
34613
|
+
|
34614
|
+
2.0.0 (planned)
|
34615
|
+
|
34616
|
+
@node W1067
|
34617
|
+
@section W1067
|
34618
|
+
@cindex W1067
|
34619
|
+
|
34620
|
+
@subsection Message body
|
34621
|
+
|
34622
|
+
A value of the `float' typed compound expression is explicitly converted into a `long double' value.
|
34623
|
+
|
34624
|
+
@subsection Content
|
34625
|
+
|
34626
|
+
@b{This message will be supported in AdLint 2.0.0}
|
34627
|
+
|
34628
|
+
Under construction.
|
34629
|
+
|
34630
|
+
@subsection Sample code
|
34631
|
+
|
34632
|
+
@verbatim
|
34633
|
+
void func(float a)
|
34634
|
+
{
|
34635
|
+
long double b = (long double) (a * a);
|
34636
|
+
}
|
34637
|
+
@end verbatim
|
34638
|
+
|
34639
|
+
@subsection Related message
|
34640
|
+
|
34641
|
+
@itemize
|
34642
|
+
@item @ref{W1066} A value of the `float' typed compound expression is explicitly converted into a `double' value.
|
34643
|
+
@item @ref{W1068} A value of the `double' typed compound expression is explicitly converted into a `long double' value.
|
34644
|
+
@end itemize
|
34645
|
+
|
34646
|
+
@subsection Since
|
34647
|
+
|
34648
|
+
2.0.0 (planned)
|
34649
|
+
|
34650
|
+
@node W1068
|
34651
|
+
@section W1068
|
34652
|
+
@cindex W1068
|
34653
|
+
|
34654
|
+
@subsection Message body
|
34655
|
+
|
34656
|
+
A value of the `double' typed compound expression is explicitly converted into a `long double' value.
|
34657
|
+
|
34658
|
+
@subsection Content
|
34659
|
+
|
34660
|
+
@b{This message will be supported in AdLint 2.0.0}
|
34661
|
+
|
34662
|
+
Under construction.
|
34663
|
+
|
34664
|
+
@subsection Sample code
|
34665
|
+
|
34666
|
+
@verbatim
|
34667
|
+
void func(double a)
|
34668
|
+
{
|
34669
|
+
long double b = (long double) (a * a);
|
34670
|
+
}
|
34671
|
+
@end verbatim
|
34672
|
+
|
34673
|
+
@subsection Related message
|
34674
|
+
|
34675
|
+
@itemize
|
34676
|
+
@item @ref{W1066} A value of the `float' typed compound expression is explicitly converted into a `double' value.
|
34677
|
+
@item @ref{W1067} A value of the `float' typed compound expression is explicitly converted into a `long double' value.
|
34678
|
+
@end itemize
|
34679
|
+
|
34680
|
+
@subsection Since
|
34681
|
+
|
34682
|
+
2.0.0 (planned)
|
34683
|
+
|
34684
|
+
@node W1069
|
34685
|
+
@section W1069
|
34686
|
+
@cindex W1069
|
34687
|
+
|
34688
|
+
@subsection Message body
|
34689
|
+
|
34690
|
+
No trailing `else' clause is found in this `if-else-if' statements chain.
|
34691
|
+
|
34692
|
+
@subsection Content
|
34693
|
+
|
34694
|
+
@b{This message will be supported in AdLint 2.0.0}
|
34695
|
+
|
34696
|
+
Under construction.
|
34697
|
+
|
34698
|
+
@subsection Sample code
|
34699
|
+
|
34700
|
+
@verbatim
|
34701
|
+
/* will be added */
|
34702
|
+
@end verbatim
|
34703
|
+
|
34704
|
+
@subsection Related message
|
34705
|
+
|
34706
|
+
None.
|
34707
|
+
|
34708
|
+
@subsection Since
|
34709
|
+
|
34710
|
+
2.0.0 (planned)
|
34711
|
+
|
34712
|
+
@node W1070
|
34713
|
+
@section W1070
|
34714
|
+
@cindex W1070
|
34715
|
+
|
34716
|
+
@subsection Message body
|
34717
|
+
|
34718
|
+
This `switch' statement can be translated into `if-else' statement because there are only 2 execution paths.
|
34719
|
+
|
34720
|
+
@subsection Content
|
34721
|
+
|
34722
|
+
@b{This message will be supported in AdLint 2.0.0}
|
34723
|
+
|
34724
|
+
Under construction.
|
34725
|
+
|
34726
|
+
@subsection Sample code
|
34727
|
+
|
34728
|
+
@verbatim
|
34729
|
+
switch (x) {
|
34730
|
+
case 1:
|
34731
|
+
...
|
34732
|
+
break;
|
34733
|
+
default:
|
34734
|
+
...
|
34735
|
+
}
|
34736
|
+
@end verbatim
|
34737
|
+
|
34738
|
+
@subsection Related message
|
34739
|
+
|
34740
|
+
None.
|
34741
|
+
|
34742
|
+
@subsection Since
|
34743
|
+
|
34744
|
+
2.0.0 (planned)
|
34745
|
+
|
34746
|
+
@node W1071
|
34747
|
+
@section W1071
|
34748
|
+
@cindex W1071
|
34749
|
+
|
34750
|
+
@subsection Message body
|
34751
|
+
|
34752
|
+
Function `%s' has multiple termination points.
|
34753
|
+
|
34754
|
+
@subsection Content
|
34755
|
+
|
34756
|
+
@b{This message will be supported in AdLint 2.0.0}
|
34757
|
+
|
34758
|
+
Under construction.
|
34759
|
+
|
34760
|
+
@subsection Sample code
|
34761
|
+
|
34762
|
+
@verbatim
|
34763
|
+
int func(int a)
|
34764
|
+
{
|
34765
|
+
if( a == 0 ) {
|
34766
|
+
return 0;
|
34767
|
+
}
|
34768
|
+
else {
|
34769
|
+
return 1; /* W1071 */
|
34770
|
+
}
|
34771
|
+
}
|
34772
|
+
@end verbatim
|
34773
|
+
|
34774
|
+
@subsection Related message
|
34775
|
+
|
34776
|
+
None.
|
34777
|
+
|
34778
|
+
@subsection Since
|
34779
|
+
|
34780
|
+
2.0.0 (planned)
|
34781
|
+
|
34782
|
+
@node W1072
|
34783
|
+
@section W1072
|
34784
|
+
@cindex W1072
|
34785
|
+
|
34786
|
+
@subsection Message body
|
34787
|
+
|
34788
|
+
`A `goto' statement is found.
|
34789
|
+
|
34790
|
+
@subsection Content
|
34791
|
+
|
34792
|
+
@b{This message will be supported in AdLint 2.0.0}
|
34793
|
+
|
34794
|
+
Under construction.
|
34795
|
+
|
34796
|
+
@subsection Sample code
|
34797
|
+
|
34798
|
+
@verbatim
|
34799
|
+
/* will be added */
|
34800
|
+
@end verbatim
|
34801
|
+
|
34802
|
+
@subsection Related message
|
34803
|
+
|
34804
|
+
None.
|
34805
|
+
|
34806
|
+
@subsection Since
|
34807
|
+
|
34808
|
+
2.0.0 (planned)
|
34809
|
+
|
34810
|
+
@node W1073
|
34811
|
+
@section W1073
|
34812
|
+
@cindex W1073
|
34813
|
+
|
34814
|
+
@subsection Message body
|
34815
|
+
|
34816
|
+
A return value of function `%s' is not used.。
|
34817
|
+
|
34818
|
+
@subsection Content
|
34819
|
+
|
34820
|
+
@b{This message will be supported in AdLint 2.0.0}
|
34821
|
+
|
34822
|
+
Under construction.
|
34823
|
+
|
34824
|
+
@subsection Sample code
|
34825
|
+
|
34826
|
+
@verbatim
|
34827
|
+
/* will be added */
|
34828
|
+
@end verbatim
|
34829
|
+
|
34830
|
+
@subsection Related message
|
34831
|
+
|
34832
|
+
None.
|
34833
|
+
|
34834
|
+
@subsection Since
|
34835
|
+
|
34836
|
+
2.0.0 (planned)
|
34837
|
+
|
34838
|
+
@node W1074
|
34839
|
+
@section W1074
|
34840
|
+
@cindex W1074
|
34841
|
+
|
34842
|
+
@subsection Message body
|
34843
|
+
|
34844
|
+
Side-effects in `sizeof' operand will not be recorded because the operand will not be executed actually.
|
34845
|
+
|
34846
|
+
@subsection Content
|
34847
|
+
|
34848
|
+
@b{This message will be supported in AdLint 2.0.0}
|
34849
|
+
|
34850
|
+
Under construction.
|
34851
|
+
|
34852
|
+
@subsection Sample code
|
34853
|
+
|
34854
|
+
@verbatim
|
34855
|
+
int i = sizeof(data++); /* W1074 */
|
34856
|
+
@end verbatim
|
34857
|
+
|
34858
|
+
@subsection Related message
|
34859
|
+
|
34860
|
+
None.
|
34861
|
+
|
34862
|
+
@subsection Since
|
34863
|
+
|
34864
|
+
2.0.0 (planned)
|
34865
|
+
|
34866
|
+
@node W1075
|
34867
|
+
@section W1075
|
34868
|
+
@cindex W1075
|
34869
|
+
|
34870
|
+
@subsection Message body
|
34871
|
+
|
34872
|
+
This declaration has no `static' storage-class-specifier while the declaring object has internal-linkage.
|
34873
|
+
|
34874
|
+
@subsection Content
|
34875
|
+
|
34876
|
+
@b{This message will be supported in AdLint 2.0.0}
|
34877
|
+
|
34878
|
+
Under construction.
|
34879
|
+
|
34880
|
+
@subsection Sample code
|
34881
|
+
|
34882
|
+
@verbatim
|
34883
|
+
static int func(void);
|
34884
|
+
int func(void) /* W1075 */
|
34885
|
+
{
|
34886
|
+
...
|
34887
|
+
}
|
34888
|
+
@end verbatim
|
34889
|
+
|
34890
|
+
@subsection Related message
|
34891
|
+
|
34892
|
+
None.
|
34893
|
+
|
34894
|
+
@subsection Since
|
34895
|
+
|
34896
|
+
2.0.0 (planned)
|
34897
|
+
|
34898
|
+
@node W1076
|
34899
|
+
@section W1076
|
34900
|
+
@cindex W1076
|
34901
|
+
|
34902
|
+
@subsection Message body
|
34903
|
+
|
34904
|
+
`%s' is defined as internal-linkage, but it has no forward declaration.
|
34905
|
+
|
34906
|
+
@subsection Content
|
34907
|
+
|
34908
|
+
@b{This message will be supported in AdLint 2.0.0}
|
34909
|
+
|
34910
|
+
Under construction.
|
34911
|
+
|
34912
|
+
@subsection Sample code
|
34913
|
+
|
34914
|
+
@verbatim
|
34915
|
+
static int func(void) /* W1076 */
|
34916
|
+
{
|
34917
|
+
...
|
34918
|
+
return ret;
|
34919
|
+
}
|
34920
|
+
@end verbatim
|
34921
|
+
|
34922
|
+
@subsection Related message
|
34923
|
+
|
34924
|
+
None.
|
34925
|
+
|
34926
|
+
@subsection Since
|
34927
|
+
|
34928
|
+
2.0.0 (planned)
|
34929
|
+
|
34930
|
+
@node W1077
|
34931
|
+
@section W1077
|
34932
|
+
@cindex W1077
|
34933
|
+
|
34934
|
+
@subsection Message body
|
34935
|
+
|
34936
|
+
Declaring array object without a size.
|
34937
|
+
|
34938
|
+
@subsection Content
|
34939
|
+
|
34940
|
+
@b{This message will be supported in AdLint 2.0.0}
|
34941
|
+
|
34942
|
+
Under construction.
|
34943
|
+
|
34944
|
+
@subsection Sample code
|
34945
|
+
|
34946
|
+
@verbatim
|
34947
|
+
extern int array[]; /* W1077 */
|
34948
|
+
@end verbatim
|
34949
|
+
|
34950
|
+
@subsection Related message
|
34951
|
+
|
34952
|
+
None.
|
34953
|
+
|
34954
|
+
@subsection Since
|
34955
|
+
|
34956
|
+
2.0.0 (planned)
|
34957
|
+
|
34958
|
+
|
34545
34959
|
@node W9001
|
34546
34960
|
@section W9001
|
34547
34961
|
|
@@ -34623,6 +35037,42 @@ None.
|
|
34623
35037
|
|
34624
35038
|
1.0.0
|
34625
35039
|
|
35040
|
+
@node W9003
|
35041
|
+
@section W9003
|
35042
|
+
@cindex W9003
|
35043
|
+
|
35044
|
+
@subsection Message body
|
35045
|
+
|
35046
|
+
An object typed `%s' is implicitly converted into an object of other type.
|
35047
|
+
|
35048
|
+
@subsection Content
|
35049
|
+
|
35050
|
+
This message indicates that an implicit conversion from or to an object of the
|
35051
|
+
non-standard type will occur.
|
35052
|
+
|
35053
|
+
@subsection Sample code
|
35054
|
+
|
35055
|
+
@verbatim
|
35056
|
+
enum Color { RED, BLUE, GREEN };
|
35057
|
+
enum Fruit { APPLE, BANANA, ORANGE };
|
35058
|
+
|
35059
|
+
extern void foo(enum Color);
|
35060
|
+
|
35061
|
+
static void bar(void)
|
35062
|
+
{
|
35063
|
+
int i = RED; /* W9003 */
|
35064
|
+
foo(ORANGE); /* W9003 */
|
35065
|
+
}
|
35066
|
+
@end verbatim
|
35067
|
+
|
35068
|
+
@subsection Related message
|
35069
|
+
|
35070
|
+
None.
|
35071
|
+
|
35072
|
+
@subsection Since
|
35073
|
+
|
35074
|
+
1.12.0
|
35075
|
+
|
34626
35076
|
@node C0001
|
34627
35077
|
@section C0001
|
34628
35078
|
@cindex C0001
|