code review request for CR 6989705: ECC security code native code compiler warnings

Kelly O'Hair kelly.ohair at oracle.com
Fri Jan 21 17:11:33 UTC 2011


On Jan 21, 2011, at 7:08 AM, Vincent Ryan wrote:

> On 21/01/2011 14:42, Alan Bateman wrote:
>> Vincent Ryan wrote:
>>> Hello Alan,
>>>
>>> Please review the following webrev which removes 100's of nuisance  
>>> compiler
>>> warnings generated by our ECC code:
>>>
>>> http://rialto.ireland.sun.com/~vinnie/webrevs/jdk7/6989705/webrev/
>>>
>>>
>>>
>> Getting rid of the #pragmas and the other changes look okay to me.  
>> The only
>> concern is the Makefile changes to hide the remaining warnings.  
>> Would there be
>> many changes required to address those so that those warnings can  
>> be re-enabled?
>>
>> -Alan
>
> The remaining warnings are mostly loss-of-precision warnings - which  
> are safe
> to inhibit because they are due to wide data types which have been  
> masked down
> to narrower data types before assignment. I'll take another pass  
> through the
> code to examine whether any of these warnings can also be eliminated.

Normally explicit casts tend to get rid of the narrowing warnings, and  
makes it obvious
in the code that we know it is happening and want it to be happening.
It's the 'long' type you have to watch out for, on 64bit Windows it's  
32bits as I recall.

I'm ok with some special cases warnings that we decide we never want  
to see because they are
like 90% useless or broken, but it makes me nervous to just shut down  
all occurrences if there might be
some value to that warning.

I know fixing these warnings is a bit of a pain, but I do think it's  
worth it in the long run.
I appreciate all efforts in this area. Thanks.

-kto




More information about the security-dev mailing list