[vlc-devel] [vlc-commits] Contribs: update live555 for security issues
Ross Finlayson
finlayson at live555.com
Thu Dec 5 00:00:59 CET 2013
>>> This breaks win64 (full log below):
>>> RTPInterface.cpp:365:40: error: cast from 'const char*' to 'long int'
>>> loses precision [-fpermissive]
>> That should be (at most) a warning, not an error.
>
> Why? On Win64, const char* is 64 bits and long int is 32. It's an error
> according to the C++ standard, as far as I know; if you really want that,
> you'll first need to cast through an integral value that's big enough
> (e.g., std::intptr_t) and only then truncate to long.
Well, it's weird that none of the almost 2000 people on our LIVE555 developers' mailing list has complained about this. So I don't know why you're the only person who is having a problem with this code. But I agree that the code doesn't look kosher, and should be improved.
Does it make your compiler happier if you replace the line:
long streamChannelIdLong = (long)key;
with:
u_int64_t streamChannelIdLong = (u_int64_t)key;
?
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20131205/5bf125a5/attachment.html>
More information about the vlc-devel
mailing list