summaryrefslogtreecommitdiff
path: root/video_engine/vie_codec_impl.cc
diff options
context:
space:
mode:
authorandrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-05-09 02:12:07 +0000
committerandrew@webrtc.org <andrew@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-05-09 02:12:07 +0000
commit7ab726855f2ceb9ff6365e3240668d58f45e6761 (patch)
treecf00bd2a3d0e8b4241c66a7b32c9abe65103c7bc /video_engine/vie_codec_impl.cc
parent5dea86a9c0ad69135561667a6912b26be0de692b (diff)
downloadwebrtc-7ab726855f2ceb9ff6365e3240668d58f45e6761.tar.gz
Fix compile errors in ViE with latest clang.
Rolling to the latest Chromium picks up a new clang, which catches a fresh error: error: 'reinterpret_cast' to class 'webrtc::VideoEngineImpl *' from its base at non-zero offset 'webrtc::VideoEngine *' behaves differently from 'static_cast' [-Werror,-Wreinterpret-base-class] VideoEngineImpl* vie_impl = reinterpret_cast<VideoEngineImpl*>(video_engine); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../webrtc/video_engine/vie_codec_impl.cc:36:31: note: use 'static_cast' to adjust the pointer correctly while downcasting VideoEngineImpl* vie_impl = reinterpret_cast<VideoEngineImpl*>(video_engine); ^~~~~~~~~~~~~~~~ static_cast This was triggered by André's change here: https://code.google.com/p/webrtc/source/detail?r=3986 which made VideoEngineImpl a derived class of VideoEngine (good). Picked up one other error as well: error: implicit conversion from 'long' to 'int' changes value from 9223372036854775807 to -1 [-Werror,-Wconstant-conversion] AutoTestSleep(std::numeric_limits<long>::max()); ~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This fixes the errors and is required before stable can be rolled in Chromium. TBR=mflodman,andresp Review URL: https://webrtc-codereview.appspot.com/1450004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@3989 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'video_engine/vie_codec_impl.cc')
-rw-r--r--video_engine/vie_codec_impl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/video_engine/vie_codec_impl.cc b/video_engine/vie_codec_impl.cc
index 67ac417d..77b4d890 100644
--- a/video_engine/vie_codec_impl.cc
+++ b/video_engine/vie_codec_impl.cc
@@ -33,7 +33,7 @@ ViECodec* ViECodec::GetInterface(VideoEngine* video_engine) {
if (!video_engine) {
return NULL;
}
- VideoEngineImpl* vie_impl = reinterpret_cast<VideoEngineImpl*>(video_engine);
+ VideoEngineImpl* vie_impl = static_cast<VideoEngineImpl*>(video_engine);
ViECodecImpl* vie_codec_impl = vie_impl;
// Increase ref count.
(*vie_codec_impl)++;