From kde-commits Wed Dec 11 06:03:07 2002 From: George Staikos Date: Wed, 11 Dec 2002 06:03:07 +0000 To: kde-commits Subject: kdeutils/klaptopdaemon (silent) X-MARC-Message: https://marc.info/?l=kde-commits&m=103958664321143 CVS commit by staikos: fix compiler warning CVS_SILENT M +5 -2 portable.cpp 1.38 --- kdeutils/klaptopdaemon/portable.cpp #1.37:1.38 @@ -201,5 +201,5 @@ pmu_read(apm_info *ap) bf.close(); } - ap->battery_percentage = 100*float(float(charge)/float(maxcharge)); + ap->battery_percentage = int(100.0*float(float(charge)/float(maxcharge))); ap->battery_time = timerem; @@ -476,4 +476,7 @@ has_apm() apm_no_time = apmx.battery_time < 0; } + + if (val == 0) + val = have_pmu(); return(val); }