Re: Bug in ETA code on x64

2006-04-03 Thread Thomas Braby
- Original Message - From: Hrvoje Niksic [EMAIL PROTECTED] Date: Tuesday, March 28, 2006 7:23 pm in progress.c line 880: eta_hrs = (int)(eta / 3600, eta %= 3600); eta_min = (int)(eta / 60, eta %= 60); eta_sec = (int)(eta); This is weird. Did you compile the code

Re: Bug in ETA code on x64

2006-04-03 Thread Hrvoje Niksic
Thomas Braby [EMAIL PROTECTED] writes: eta_hrs = (int) (eta / 3600), eta %= 3600; Yes that also works. The cast is needed on Windows x64 because eta is a wgint (which is 64-bit) but a regular int is 32-bit so otherwise a warning is issued. The same is the case on 32-bit Windows, and also

Re: Bug in ETA code on x64

2006-03-29 Thread Greg Hurrell
El 28/03/2006, a las 20:43, Tony Lewis escribió: Hrvoje Niksic wrote: The cast to int looks like someone was trying to remove a warning and botched operator precedence in the process. I can't see any good reason to use , here. Why not write the line as: eta_hrs = eta / 3600; eta %=

Re: Bug in ETA code on x64

2006-03-29 Thread Hrvoje Niksic
Greg Hurrell [EMAIL PROTECTED] writes: El 28/03/2006, a las 20:43, Tony Lewis escribió: Hrvoje Niksic wrote: The cast to int looks like someone was trying to remove a warning and botched operator precedence in the process. I can't see any good reason to use , here. Why not write the line

Re: Bug in ETA code on x64

2006-03-28 Thread Hrvoje Niksic
Thomas Braby [EMAIL PROTECTED] writes: With wget 1.10.2 compiled using Visual Studio 2005 for Windows XP x64 I was getting no ETA until late in the transfer, when I'd get things like: 49:49:49 then 48:48:48 then 47:47:47 etc. So I checked the eta value in seconds and it was correct, so

RE: Bug in ETA code on x64

2006-03-28 Thread Tony Lewis
Hrvoje Niksic wrote: The cast to int looks like someone was trying to remove a warning and botched operator precedence in the process. I can't see any good reason to use , here. Why not write the line as: eta_hrs = eta / 3600; eta %= 3600; This makes it much less likely that someone