Dmitri wrote:

> Hi
> Miguel is it possible to make small cosmetic change in the source of
> the org.jmol.viewer.Frame class:
>
> I use CodeWarrior compiler and it complains
> Error   : Variable timeBegin may not have been initialized.
> Frame.java line 1033           System.out.println("time to build bspf="
> + (timeEnd - timeBegin) +
>
> Error   : Variable timeBegin may not have been initialized.
> Frame.java line 1154         System.out.println("Time to autoBond=" +
> (timeEnd - timeBegin));
>
> Error   : Variable timeBegin may not have been initialized.
> Frame.java line 1248            System.out.println("Time to hbond=" +
> (timeEnd - timeBegin));
>
> all you have to do just
>
> change line 1006, 1126 and 1216
> from
>        long timeBegin, timeEnd;
> to
>        long timeBegin = 0, timeEnd;

Yes I will.

Thank you for bringing this to my attention.

> or whatever change you  think would be appropriate.
>
> javac doesn't complain
> but I think CodeWarrior is right (yes I know java initialize everything
> to 0 and it's probably CW's bug
> I would treat it as a warning not as an error)

Actually, CodeWarrior may be right.

local variables are not initialized to 0. The javac compiler will complain
if there is a path to a variable that may not have been initialized.

In this case, those variables are only used depending upon the value of a
'final static boolean' variable.

When that variable is false, the javac is eliminating tha path in the
code. CodeWarrior is performing its own checking, but in a different
order.

> but still
> thank you very much in advance
>

Thank you for bringing this to my attention. It is good that we correct
these things.



Miguel

> Dmitry Markman
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Jmol-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>


--------------------------------------------------
Michael T. Howard              [EMAIL PROTECTED]
23 Algonquin Avenue            tele 978-474-4559
Andover,  MA 01810-5527        cell 978-886-3697
USA                            fax  978-662-3126
--------------------------------------------------


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=click
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to