Closed
Bug 1123012
Opened 8 years ago
Closed 8 years ago
.../audio_coding/main/acm2/audio_coding_module_impl.cc:2075:10: error: reinterpret_cast from 'nullptr_t' to 'const webrtc::AudioEncoder *' is not
Categories
(Core :: WebRTC, defect, P5)
Tracking
()
RESOLVED
FIXED
mozilla39
People
(Reporter: jbeich, Assigned: gcp)
References
Details
Attachments
(2 files)
1.59 KB,
patch
|
jesup
:
review-
|
Details | Diff | Splinter Review |
1.73 KB,
patch
|
jesup
:
review+
jbeich
:
feedback+
lsblakk
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
The file builds fine with gcc-4.9 but fails with clang 3.5. In file included from media/webrtc/trunk/webrtc/modules/modules_audio_coding_module/Unified_cpp__audio_coding_module0.cpp:119: media/webrtc/trunk/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc:2075:10: error: reinterpret_cast from 'nullptr_t' to 'const webrtc::AudioEncoder *' is not allowed return reinterpret_cast<const AudioEncoder*>(NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media/webrtc/trunk/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc:2094:10: error: reinterpret_cast from 'nullptr_t' to 'const webrtc::ReceiverInfo *' is not allowed return reinterpret_cast<const ReceiverInfo*>(NULL); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated.
FreeBSD implements NULL as nullptr in C++11 mode but GCC provides its own NULL via fixincludes. So, rather than casting just use nullptr because it is "implicitly convertible and comparable to any pointer type or pointer-to-member type."
Attachment #8550835 -
Flags: review?(rjesup)
Comment 2•8 years ago
|
||
Comment on attachment 8550835 [details] [diff] [review] use nullptr Review of attachment 8550835 [details] [diff] [review]: ----------------------------------------------------------------- Upstream does not use nullptr, so we really don't want to introduce its usage here. Some other workaround will be needed. Worst-case - an ifdef, but I'd prefer to avoid it and instead use some type of casting as needed, or a temporary the compiler will do away with.
Attachment #8550835 -
Flags: review?(rjesup) → review-
Assignee | ||
Comment 3•8 years ago
|
||
How about just replacing the whole cast by return NULL? Works fine for GCC. What about clang?
Assignee | ||
Comment 4•8 years ago
|
||
Seems to work with GCC 4.9.2 and clang 3.5 for me.
Attachment #8567857 -
Flags: review?(rjesup)
Updated•8 years ago
|
Attachment #8567857 -
Flags: review?(rjesup) → review+
Comment on attachment 8567857 [details] [diff] [review] Just return a NULL ptr instead of casting NULL Works for me as well.
Attachment #8567857 -
Flags: feedback+
Assignee | ||
Comment 6•8 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=ae25ca06ae31
Updated•8 years ago
|
Severity: normal → major
Flags: firefox-backlog+
Priority: -- → P5
Assignee | ||
Comment 7•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b7bceb058d33
https://hg.mozilla.org/mozilla-central/rev/b7bceb058d33
Assignee: nobody → gpascutto
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Assignee | ||
Updated•8 years ago
|
Blocks: webrtc_upstream_bugs
Comment on attachment 8567857 [details] [diff] [review] Just return a NULL ptr instead of casting NULL The fix didn't make it in time before the uplift: http://buildbot.rhaalovely.net/builders/mozilla-central-freebsd-amd64 http://buildbot.rhaalovely.net/builders/mozilla-aurora-freebsd-amd64 Approval Request Comment [Feature/regressing bug #]: bug 1109248 regression [User impact if declined]: broken build on FreeBSD or any other platform with #define NULL nullptr in system headers; GCC builds aren't affected due to compiler's hacks [Describe test coverage new/current, TreeHerder]: Try in comment 6, landed in m-c [Risks and why]: Low, can only break build. [String/UUID change made/needed]: None
Attachment #8567857 -
Flags: approval-mozilla-aurora?
Comment 10•8 years ago
|
||
Comment on attachment 8567857 [details] [diff] [review] Just return a NULL ptr instead of casting NULL low risk, approving.
Attachment #8567857 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•8 years ago
|
status-firefox38:
--- → affected
Updated•5 years ago
|
No longer blocks: webrtc_upstream_bugs
You need to log in
before you can comment on or make changes to this bug.
Description
•