Closed
Bug 854085
Opened 13 years ago
Closed 13 years ago
error: variable 'rv' set but not used [-Werror=unused-but-set-variable] with gcc 4.7
Categories
(Core :: WebRTC, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: glandium, Assigned: glandium)
References
Details
(Whiteboard: [qa-])
Attachments
(2 files, 1 obsolete file)
|
1.15 KB,
patch
|
jesup
:
review+
|
Details | Diff | Splinter Review |
|
1.20 KB,
patch
|
jesup
:
review+
|
Details | Diff | Splinter Review |
nr_socket_prsock.cpp: In member function 'int mozilla::NrSocket::sendto(const void*, size_t, int, nr_transport_addr*)':
nr_socket_prsock.cpp:380:44: error: variable 'rv' set but not used [-Werror=unused-but-set-variable]
nr_socket_prsock.cpp: In member function 'int mozilla::NrSocket::recvfrom(void*, size_t, size_t*, int, nr_transport_addr*)':
nr_socket_prsock.cpp:407:44: error: variable 'rv' set but not used [-Werror=unused-but-set-variable]
nr_socket_prsock.cpp: In member function 'int mozilla::NrSocket::getaddr(nr_transport_addr*)':
nr_socket_prsock.cpp:430:44: error: variable 'rv' set but not used [-Werror=unused-but-set-variable]
nr_socket_prsock.cpp: In member function 'void mozilla::NrSocket::close()':
nr_socket_prsock.cpp:436:44: error: variable 'rv' set but not used [-Werror=unused-but-set-variable]
nriceresolver.cpp: In member function 'int mozilla::NrIceResolver::resolve(nr_resolver_resource*, int (*)(void*, nr_transport_addr*), void*, void**)':
nriceresolver.cpp:153:45: error: variable 'rv' set but not used [-Werror=unused-but-set-variable]
nriceresolver.cpp: In member function 'virtual nsresult mozilla::NrIceResolver::PendingResolution::OnLookupComplete(nsICancelable*, nsIDNSRecord*, nsresult)':
nriceresolver.cpp:183:41: error: variable 'rv' set but not used [-Werror=unused-but-set-variable]
nriceresolver.cpp: In static member function 'static int mozilla::NrIceResolver::cancel(void*, void*)':
nriceresolver.cpp:206:80: error: variable 'rv' set but not used [-Werror=unused-but-set-variable]
This can be tested on try with:
--- a/build/unix/mozconfig.linux
+++ b/build/unix/mozconfig.linux
@@ -1,4 +1,4 @@
. "$topsrcdir/build/mozconfig.common"
-CC=/tools/gcc-4.5-0moz3/bin/gcc
-CXX=/tools/gcc-4.5-0moz3/bin/g++
+CC=/tools/gcc-4.7.2-0moz1/bin/gcc
+CXX=/tools/gcc-4.7.2-0moz1/bin/g++
| Assignee | ||
Comment 1•13 years ago
|
||
Attachment #728624 -
Flags: review?(rjesup)
| Assignee | ||
Updated•13 years ago
|
Assignee: nobody → mh+mozilla
Comment 2•13 years ago
|
||
Comment on attachment 728624 [details] [diff] [review]
Fix unused-but-set-variable from ASSERT_ON_THREAD macro in media/mtransport/runnable_utils.h
Wouldn't making 'rv' DebugOnly just make 'on' unused as well? Shouldn't ASSERT_ON_THREAD() just do nothing if not debug?
| Assignee | ||
Comment 3•13 years ago
|
||
(In reply to Dave Garrett from comment #2)
> Comment on attachment 728624 [details] [diff] [review]
> Fix unused-but-set-variable from ASSERT_ON_THREAD macro in
> media/mtransport/runnable_utils.h
>
> Wouldn't making 'rv' DebugOnly just make 'on' unused as well?
Strangely, gcc 4.7 doesn't complain.
> Shouldn't ASSERT_ON_THREAD() just do nothing if not debug?
Mmmmm probably.
| Assignee | ||
Comment 4•13 years ago
|
||
Attachment #728643 -
Flags: review?(rjesup)
| Assignee | ||
Updated•13 years ago
|
Attachment #728624 -
Attachment is obsolete: true
Attachment #728624 -
Flags: review?(rjesup)
Comment 5•13 years ago
|
||
Comment on attachment 728643 [details] [diff] [review]
Fix unused-but-set-variable from ASSERT_ON_THREAD macro in media/mtransport/runnable_utils.h
Review of attachment 728643 [details] [diff] [review]:
-----------------------------------------------------------------
r-. we'll need to leave the RUN_ON_THREAD stuff to be on in production builds as webrtc thread assertions if violated can lead to security issues, and per discussions with dveditz we want to leave them on in opt/production builds "for a while" at least.
r+ without that change (i.e. r+ the previous patch).
Attachment #728643 -
Flags: review?(rjesup) → review-
Comment 6•13 years ago
|
||
Comment on attachment 728643 [details] [diff] [review]
Fix unused-but-set-variable from ASSERT_ON_THREAD macro in media/mtransport/runnable_utils.h
Review of attachment 728643 [details] [diff] [review]:
-----------------------------------------------------------------
r+ actually - the assertions haven't been changed to be enabled opt/production yet, and thus the patch as it stands is correct.
Attachment #728643 -
Flags: review- → review+
| Assignee | ||
Comment 7•13 years ago
|
||
| Assignee | ||
Comment 8•13 years ago
|
||
Backout for bustage
https://hg.mozilla.org/integration/mozilla-inbound/rev/7ea611c0295c
| Assignee | ||
Comment 9•13 years ago
|
||
Relanded with the obvious fix
https://hg.mozilla.org/integration/mozilla-inbound/rev/58d7293faaff
Comment 10•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
Updated•13 years ago
|
Whiteboard: [qa-]
Updated•13 years ago
|
Flags: in-testsuite-
Comment 11•13 years ago
|
||
Updated•13 years ago
|
Attachment #738082 -
Flags: review?(rjesup)
Comment 12•13 years ago
|
||
MOZ_ASSERT is conditional on DEBUG not MOZ_DEBUG
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•13 years ago
|
Attachment #738082 -
Flags: review?(rjesup) → review+
Comment 13•13 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•