[kaffe] CVS kaffe (doogie): Several new warnings detected, including some from jikes.
Kaffe CVS
cvs-commits at kaffe.org
Thu Dec 9 18:40:56 PST 2004
PatchSet 5588
Date: 2004/12/10 02:31:55
Author: doogie
Branch: HEAD
Tag: (none)
Log:
Several new warnings detected, including some from jikes.
Members:
scripts/sort-warnings.pl:1.5->1.6
ChangeLog:1.3133->1.3134
Index: kaffe/scripts/sort-warnings.pl
diff -u kaffe/scripts/sort-warnings.pl:1.5 kaffe/scripts/sort-warnings.pl:1.6
--- kaffe/scripts/sort-warnings.pl:1.5 Sun Apr 4 05:09:58 2004
+++ kaffe/scripts/sort-warnings.pl Fri Dec 10 02:31:55 2004
@@ -6,7 +6,7 @@
my $prefix_regex = qr/^([^:\n]+):(\d+): warning: /m;
my $prefix_regex_noparam = qr/^(?:[^:\n]+):(?:\d+): warning: /m;
my $prefix_regex2 = qr/^([^:\n]+):(\d+):(?:\d+): warning: /m;
-my $jikes_prefix = qr/([^:\n]+):(\d+):\d+:\d+:\d+: Semantic Warning: /m;
+my $jikes_prefix = qr/([^:\n]+):(\d+):\d+:\d+:\d+: (?:Lexical|Semantic) (?:Caution|Warning): /m;
#<robilad> guilhem: ~3000 unique ones with -Wall -W -Wtraditional -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual
# -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes
@@ -18,14 +18,25 @@
'java:public-in-interface' => qr/${jikes_prefix}The use of the "([^"]+)" modifier in this context is redundant and strongly discouraged as a matter of style.$/m,
'java:exception-superclass' => qr/${jikes_prefix}The listing of type "([^"]+)" in the throws clause is not necessary, since its superclass, "([^"]+)", is also listed.$/m,
'java:override-default' => qr/${jikes_prefix}Method "([^"]+)" in class "([^"]+)" does not override or hide the corresponding method with default access in class "([^"]+)".$/m,
- 'java:invalid-zip' => qr/${jikes_prefix}The file "([^"]+)" does not exist or else is not a valid zip file.$/m,
+ 'java:invalid-zip:1' => qr/${jikes_prefix}The file "([^"]+)" does not exist or else is not a valid zip file.$/m,
+ 'java:invalid-zip:2' => qr/${jikes_prefix}I\/O warning: "No such file or directory" while trying to open (.*)\.$/m,
+ 'java:negative-shift-count' => qr/${jikes_prefix}The shift count (-\d+) is negative; it will be masked to the appropriate width and behave as a positive shift count.$/m,
+ 'java:large-shift-count' => qr/${jikes_prefix}The shift count of (\d+) is >= the (\d+-bit) width of the type.$/m,
+ 'java:method-is-constructor' => qr/${jikes_prefix}The name of this method "([^"]+)" matches the name of the containing class. However, the method is not a constructor since its declarator is qualified with a type.$/m,
+ 'java:use-parens' => qr/${jikes_prefix}Suggest parentheses around assignment used as truth value.$/m,
+ 'java:instance-static-access:1' => qr/${jikes_prefix}Invoking the class method "([^"]+)" via an instance is discouraged because the method invoked will be the one in the variable's declared type, not the instance's dynamic type.$/m,
+ 'java:instance-static-access:2' => qr/${jikes_prefix}Accessing the class field "([^"]+)" via an instance is discouraged because the field accessed will be the one in the variable's declared type, not the instance's dynamic type.$/m,
+ 'java:static-variable-init' => qr/${jikes_prefix}Final field "([^"]+)" is initialized with a constant expression and could be made static to save space.$/m,
+ 'java:lexical:invalid-char' => qr/${jikes_prefix}The use of "([^"]+)" in an identifier, while legal, is strongly discouraged, since it can conflict with compiler-generated names. If you are trying to access a nested type, use "([^"]+)" instead of "(?:[^"]+)".$/m,
'missing-prototypes-mismatch' => qr/${prefix_regex}no previous prototype for `([^']+)'\n${prefix_regex_noparam}type mismatch with previous implicit declaration\n${prefix_regex}previous implicit declaration of `[^']+'\n${prefix_regex_noparam}`[^']+' was previously implicitly declared to return `([^']+)'$/m,
- '-Wformat-nonliteral' => qr/${prefix_regex}format not a string literal, argument types not checked$/m,
+ '-Wformat-nonliteral:1' => qr/${prefix_regex}format not a string literal, argument types not checked$/m,
+ '-Wformat-nonliteral:2' => qr/${prefix_regex}format not a string literal and no format arguments$/m,
'-Wimplicit-func-decl' => qr/${prefix_regex}implicit declaration of function `([^']+)'$/m,
'-Wmissing-braces' => qr/${prefix_regex}missing initializer\n${prefix_regex_noparam}\(near initialization for `([^']+)'\)$/m,
'-Wunused-parameter' => qr/${prefix_regex}unused parameter `([^']+)'$/m,
+ '-Wunused-variable' => qr/${prefix_regex}unused variable `([^']+)'$/m,
'-Wfloat-equal' => qr/${prefix_regex}comparing floating point with == or != is unsafe$/m,
@@ -39,20 +50,22 @@
'-Wcast-qual:3' => qr/${prefix_regex}passing arg (\d+) of `([^']+)' discards qualifiers from pointer target type$/m,
'-Wcast-qual:4' => qr/${prefix_regex}return discards qualifiers from pointer target type$/m,
'-Wcast-qual:5' => qr/${prefix_regex}assignment discards qualifiers from pointer target type$/m,
+ '-Wcast-qual:6' => qr/${prefix_regex}assignment makes qualified function pointer from unqualified$/m,
'-Wcast-align:1' => qr/${prefix_regex}padding struct size to alignment boundary$/m,
'-Wconversion:1' => qr/${prefix_regex}negative integer implicitly converted to unsigned type$/m,
- '-Wconversion:2' => qr/${prefix_regex}passing arg (\d+) of `([^']+) makes (pointer) from (integer) without a cast$/m,
- '-Wconversion:3' => qr/${prefix_regex}passing arg (\d+) of `([^']+)' makes (pointer) from (integer) without a cast$/m,
+ '-Wconversion:2' => qr/${prefix_regex}passing arg (\d+) of `([^']+)' makes (integer|pointer) from (integer|pointer) without a cast$/m,
'-W:sign-compare' => qr/${prefix_regex}comparison of unsigned expression < 0 is always false$/m,
'-Wsign-compare:1' => qr/${prefix_regex}comparison between signed and unsigned$/m,
'-Wsign-compare:2' => qr/${prefix_regex}signed and unsigned type in conditional expression$/m,
'-Waggregate-return:1' => qr/${prefix_regex}function call has aggregate value$/m,
'-Waggregate-return:2' => qr/${prefix_regex}function returns an aggregate$/m,
- '-Wstrict-prototypes' => qr/${prefix_regex}non-static declaration for `([^']+)' follows static$/m,
+ '-Wstrict-prototypes:1' => qr/${prefix_regex}non-static declaration for `([^']+)' follows static$/m,
+ '-Wstrict-prototypes:2' => qr/${prefix_regex}function declaration isn't a prototype$/m,
'-Wmissing-prototypes' => qr/${prefix_regex}no previous prototype for `([^']+)'$/m,
'-Wmissing-declarations:1' => qr/${prefix_regex2}"([^"]+)" is not defined\s*$/m,
'-Wmissing-declarations:2' => qr/${prefix_regex2}`([^']+)' is not defined\s*$/m,
- '-Wmissing-noreturn' => qr/${prefix_regex}function might be possible candidate for attribute `(noreturn)'$/m,
+ '-Wmissing-noreturn:1' => qr/${prefix_regex}function might be possible candidate for attribute `(noreturn)'$/m,
+ '-Wmissing-noreturn:2' => qr/${prefix_regex}`([^']+)' function does return$/m,
'-Wmissing-format-attribute' => qr/${prefix_regex}function might be possible candidate for `printf' format attribute$/m,
'-Wpadded' => qr/${prefix_regex}padding struct to align `([^']+)'$/m,
'-Wredundant-decls' => qr/${prefix_regex}redundant redeclaration of `([^']+)' in same scope\n${prefix_regex}previous declaration of `[^']+'$/m,
@@ -68,13 +81,16 @@
'traditional-2' => qr/${prefix_regex}passing arg (\d+) of (?:`([^']+)'|(pointer to function)) as (unsigned|signed) due to prototype$/m,
'traditional-3' => qr/${prefix_regex}passing arg (\d+) of `([^']+)' as `([^']+)' rather than `([^']+)' due to prototype$/m,
'traditional-4' => qr/${prefix_regex}macro arg `([^']+)' would be stringified with -traditional\.$/m,
- 'traditional-5' => qr/${prefix_regex}passing arg (\d+) of `([^']+)' as (floating) rather than (integer) due to prototype$/m,
+ 'traditional-5' => qr/${prefix_regex}passing arg (\d+) of `([^']+)' as (floating|integer) rather than (floating|integer) due to prototype$/m,
+ 'traditional-6' => qr/${prefix_regex}passing arg (\d+) of (?:`([^']+)'|(pointer to function)) as `([^']+)' rather than `([^']+)' due to prototype$/m,
+ 'traditional-7' => qr/${prefix_regex}passing arg (\d+) of (?:`([^']+)'|(pointer to function)) from incompatible pointer type$/m,
- 'implicit-func-decl-mismatch' => qr/${prefix_regex}implicit declaration of function `([^']+)'$/m,
'deprecated-lvalue' => qr/${prefix_regex}use of (compound|conditional|cast) expressions as lvalues is deprecated$/m,
-
+ 'foo-1' => qr/${prefix_regex}`([^']+)' declared inside parameter list$/m,
+ 'foo-2' => qr/${prefix_regex}(assignment|initialization) from incompatible pointer type$/m,
+ 'foo-4' => qr/${prefix_regex}integer constant is too large for "([^"]+)" type$/m,
);
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3133 kaffe/ChangeLog:1.3134
--- kaffe/ChangeLog:1.3133 Fri Dec 10 02:30:08 2004
+++ kaffe/ChangeLog Fri Dec 10 02:31:49 2004
@@ -1,5 +1,10 @@
2004-12-09 Adam Heath <doogie at brainfood.com>
+ * scripts/sort-warnings.pl: Several new warnings detected, including
+ some from jikes.
+
+2004-12-09 Adam Heath <doogie at brainfood.com>
+
* configure, configure.ac: If --with-jikes is given with no value,
then use "$JIKESPROG +Pno-switchcheck +Pno-shadow +E."
More information about the kaffe
mailing list