Closed
Bug 1378412
Opened 7 years ago
Closed 7 years ago
Build error on Linux 32 bit due to a warning in task_queue_libevent.cc with clang 4.0
Categories
(Core :: WebRTC, defect, P1)
Core
WebRTC
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: ehsan.akhgari, Assigned: dminor)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
1.00 KB,
patch
|
jesup
:
review+
|
Details | Diff | Splinter Review |
mozconfig: export CC=clang export CXX=clang++ export CCACHE_COMPRESS="" export CCACHE_CPP2="yes" export CFLAGS="-fcolor-diagnostics" export CXXFLAGS="-fcolor-diagnostics" . $topsrcdir/browser/config/mozconfig mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-opt32 mk_add_options AUTOCLOBBER=1 ac_add_options --enable-optimize ac_add_options --disable-debug ac_add_options --enable-profiling error: 20:17.87 /moz/src.1347035/media/webrtc/trunk/webrtc/base/task_queue_libevent.cc:237:19: error: non-constant-expression cannot be narrowed from type 'unsigned int' to '__time_t' (aka 'long') in initializer list [-Wc++11-narrowing] 20:17.87 timeval tv = {milliseconds / 1000, 20:17.87 ^~~~~~~~~~~~~~~~~~~ 20:17.87 /moz/src.1347035/media/webrtc/trunk/webrtc/base/task_queue_libevent.cc:237:19: note: insert an explicit cast to silence this issue 20:17.87 timeval tv = {milliseconds / 1000, 20:17.87 ^~~~~~~~~~~~~~~~~~~ 20:17.87 static_cast<__time_t>( )
Reporter | ||
Updated•7 years ago
|
Blocks: buildwarning
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → dminor
Rank: 19
Priority: -- → P1
Assignee | ||
Comment 2•7 years ago
|
||
Fixes the warning as the compiler suggests.
Attachment #8883934 -
Flags: review?(rjesup)
Reporter | ||
Comment 3•7 years ago
|
||
You probably want to cast to time_t, not __time_t (the latter is an internal compiler specific typedef AFAIK. Also note that this is upstream code AFAIK which we may not be allowed to modify locally.
Assignee | ||
Comment 4•7 years ago
|
||
Thanks for pointing out I had used __time_t. We have already had to add a cast in the following line over in Bug 1375238 to fix another clang warning, so there's a precedent for fixing these.
Attachment #8883934 -
Attachment is obsolete: true
Attachment #8883934 -
Flags: review?(rjesup)
Attachment #8884007 -
Flags: review?(rjesup)
Updated•7 years ago
|
Attachment #8884007 -
Flags: review?(rjesup) → review+
Pushed by dminor@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/2b3851740c1b Fix build error on Linux 32 bit due to a warning in task_queue_libevent.cc with clang 4.0; r=jesup
Comment 6•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/2b3851740c1b
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in
before you can comment on or make changes to this bug.
Description
•