[kaffe] warning hunt

Nektarios K. Papadopoulos npapadop at inaccessnetworks.com
Wed Apr 7 01:11:02 PDT 2004



Adam Heath wrote:
> I've checked in your patch.  Be careful doing fixes to verify.c(and friends).
> I've got several fixes locally, but  not checked in, as there are several
> cascading issues.  I can cope if you send me changes, tho, that are small and
> isolated.

Thanks and sorry for the reckless copy-paste in the prototypes in
stackTrace.h

I fixed them and moved them in stackTrace.c (stackTrace.diff attached)

I also fixed several 'unreachable-code' and a few 'sign-compare' in
code-analyse.c (code-analyse.diff attached).

I also tried to resolve the 13 warnings:
'passing arg xxx of `xxxxxxxxx' with different width due to prototype'

but I just got confused! It seems that this warning is raised for any
prototyped function with argument that require conversion other than the
default. Quoting the gcc man page:
[[[[
Warn if a prototype causes a type conversion that is different from
what would happen to the same argument in the absence of a prototype.
]]]]
Passing literals or variables of the exact type (i.e. constIndex) to
arg 1 of getField for example still raises the warning.
Maybe we should just ignore this warnings?
Or should all functions accept arguments of the default width (int ????)
and cast / convert /  check limits locally ?

 >>BTW scripts/sort-warnings.pl warning count:
 >>before: Total Errors: 1493
 >>after : Total Errors: 1388
 >
 >
 > It'd be nice if you used gcc 3.3, as it outputs many more warnings. 
  	Using
 > anything before this, might output warnings that the script doesn't 
check for,
 > and might not output warnings that are actual problems.

I am using gcc 3.3.3 , I just don't compile everything (no awt, no
sound), thus the low warning count



cheers
nek

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: stackTrace.diff
Url: http://kaffe.org/pipermail/kaffe/attachments/20040407/17555935/attachment-0004.txt 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: code-analyse.diff
Url: http://kaffe.org/pipermail/kaffe/attachments/20040407/17555935/attachment-0005.txt 


More information about the kaffe mailing list