[mythtv] Should llabs() be used instead of abs() for long long int?

Matthew Parris parrisimo at gmail.com
Wed Jul 4 11:51:21 UTC 2012


I ran into a compile error on my QNAP NAS with Marvell 6282 1.6GHz (ARM)
and kernel 2.6.33.2:

transcode.cpp:541: error: call of overloaded 'abs(long long int)' is
ambiguous

When I edited the code and changed from abs to llabs, the compile was
successful.  Is this a particular for my system or would other systems
benefit from this change?  Patch text below:

diff --git a/mythtv/programs/mythtranscode/transcode.cpp
b/mythtv/programs/mythtranscode/transcode.cpp
index dcf0e11..eb0bf0a 100644
--- a/mythtv/programs/mythtranscode/transcode.cpp
+++ b/mythtv/programs/mythtranscode/transcode.cpp
@@ -538,7 +538,7 @@ class Cutter
         {
             return false;
         }
-        else if (abs(audioFramesToCut - frames) < audioFramesToCut)
+        else if (llabs(audioFramesToCut - frames) < audioFramesToCut)
         {
             // Drop the packet containing these frames if doing
             // so gets us closer to zero left to drop
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-dev/attachments/20120704/305d63e7/attachment.html>


More information about the mythtv-dev mailing list