pbzip2 1.1.x - Minor cosmetic change for progress indicator?

Bug #613914 reported by Jeff Gilchrist
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pbzip2
New
Undecided
Unassigned

Bug Description

from: Michael Ellis <mikee.gwu /at/ gmail [dot} com>
date: Tue, Aug 3, 2010 at 12:34 PM
subject: Minor cosmetic change?

Gcc on a solaris system gave the following warning. If we explicitly cast the calculation to an int it stops complaining. Hopefully a minor change that you can throw into a future respin at some point. (it's been some time since I've worked in c/c++ but I believe that cast works as intended)

Thanks, your software rocks!

-- mikee

pbzip2.cpp: In function `void* fileWriter(void*)':
pbzip2.cpp:1387: warning: converting to `int' from `double'

                         if (InFileSize > 0)
                         {
                                 percentComplete = (100.0 * (double)bytesProcessed / (double)InFileSize);
                         }

Changing code to:

                         if (InFileSize > 0)
                        {
                                 percentComplete = (int) (100.0 * (double)bytesProcessed / (double)InFileSize);
                         }

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.