Closed Bug 1375238 Opened 7 years ago Closed 7 years ago

WebRTC 57 fails to build with Clang i386 due to -Wc++11-narrowing

Categories

(Core :: WebRTC, defect, P1)

x86
Unspecified
defect

Tracking

()

VERIFIED FIXED
mozilla56
Tracking Status
firefox-esr52 --- unaffected
firefox54 --- unaffected
firefox55 --- unaffected
firefox56 --- fixed

People

(Reporter: jbeich, Assigned: jesup)

References

Details

(Keywords: regression)

Attachments

(1 file)

In file included from objdir/media/webrtc/trunk/webrtc/base/base_rtc_task_queue/Unified_cpp_trunk_webrtc_base0.cpp:11:
media/webrtc/trunk/webrtc/base/task_queue_libevent.cc:237:40: error: non-constant-expression cannot be narrowed from type 'unsigned int' to 'suseconds_t' (aka 'long') in initializer list [-Wc++11-narrowing]
    timeval tv = {milliseconds / 1000, (milliseconds % 1000) * 1000};
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
media/webrtc/trunk/webrtc/base/task_queue_libevent.cc:237:40: note: insert an explicit cast to silence this issue
    timeval tv = {milliseconds / 1000, (milliseconds % 1000) * 1000};
                                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                       static_cast<suseconds_t>(   )
1 error generated.

http://buildbot.rhaalovely.net/builders/mozilla-central-i386/builds/941/steps/build/logs/stdio

while GCC shows a warning instead

media/webrtc/trunk/webrtc/base/task_queue_libevent.cc: In member function 'void rtc::TaskQueue::PostDelayedTask(std::unique_ptr<rtc::QueuedTask>, uint32_t)':
media/webrtc/trunk/webrtc/base/task_queue_libevent.cc:237:32: warning: narrowing conversion of '(milliseconds / 1000u)' from 'uint32_t {aka unsigned int}' to '__time_t {aka long int}' inside { } [-Wnarrowing]
     timeval tv = {milliseconds / 1000, (milliseconds % 1000) * 1000};
                                ^
media/webrtc/trunk/webrtc/base/task_queue_libevent.cc:237:62: warning: narrowing conversion of '((milliseconds % 1000u) * 1000u)' from 'uint32_t {aka unsigned int}' to '__suseconds_t {aka long int}' inside { } [-Wnarrowing]
     timeval tv = {milliseconds / 1000, (milliseconds % 1000) * 1000};
                                                              ^

https://treeherder.mozilla.org/logviewer.html#?job_id=108935629&repo=mozilla-central&lineNumber=11585
Blocks: 1341285
No longer depends on: 1341285
Thanks jan for tracking this one..
Rank: 15
Priority: -- → P1
Can we get this one fixed one way or another ? 32-bits builds are red since webrtc 57: http://buildbot.rhaalovely.net/builders/mozilla-central-i386 .. i know this'd need a patch to external code but..

Or should i give up any hope on native 32-bits builds ?
Flags: needinfo?(rjesup)
Totaly fine with patching upstream for this
Flags: needinfo?(rjesup)
Assignee: nobody → rjesup
Status: NEW → ASSIGNED
Attachment #8882155 - Flags: review?(dminor) → review+
Pushed by rjesup@wgate.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/1b0cc6279e2c
cast so 32-bit clang will compile r=dminor
https://hg.mozilla.org/mozilla-central/rev/1b0cc6279e2c
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Builds went green since this push : http://buildbot.rhaalovely.net/builders/mozilla-central-i386/builds/951

thanks !
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: