Closed
Bug 1034140
Opened 10 years ago
Closed 10 years ago
Unable to compile on ubuntu 12.04 due to warnings-as-errors in libcubeb
Categories
(Core :: General, defect)
Tracking
()
RESOLVED
FIXED
mozilla33
Tracking | Status | |
---|---|---|
firefox32 | --- | unaffected |
firefox33 | --- | fixed |
People
(Reporter: bkelly, Assigned: cpeterson)
References
Details
(Keywords: regression)
Attachments
(1 file)
1.29 KB,
patch
|
padenot
:
review+
bkelly
:
feedback+
|
Details | Diff | Splinter Review |
I can no longer build mozilla-central on my ubuntu 12.04 virtual machine: 0:58.95 /srv/mozilla-central/media/libcubeb/src/cubeb_alsa.c: In function ‘poll_wake’: 0:58.95 /srv/mozilla-central/media/libcubeb/src/cubeb_alsa.c:223:8: error: ignoring return value of ‘write’ , declared with attribute warn_unused_result [-Werror=unused-result] 0:58.95 /srv/mozilla-central/media/libcubeb/src/cubeb_alsa.c: In function ‘alsa_run’: 0:58.95 /srv/mozilla-central/media/libcubeb/src/cubeb_alsa.c:375:11: error: ignoring return value of ‘read’, declared with attribute warn_unused_result [-Werror=unused-result] 0:58.95 cc1: all warnings being treated as errors
Reporter | ||
Updated•10 years ago
|
Assignee: nobody → paul
Assignee | ||
Comment 1•10 years ago
|
||
Ben: Sorry! What version of gcc are you using? In the meantime, you should be able to add `ac_add_options --disable-warnings-as-errors` to your mozconfig to continue building.
Reporter | ||
Comment 2•10 years ago
|
||
bkelly@lenir:/srv/mozilla-central/.hg/patches$ gcc --version gcc-4.6.real (Ubuntu/Linaro 4.6.4-1ubuntu1~12.04) 4.6.4 Thanks. I just rolled back to a previous commit for now.
Flags: needinfo?(bkelly)
Assignee | ||
Comment 3•10 years ago
|
||
Ben: when you have a chance, can you please test this patch? I don't have a Linux build environment. My Android build environment uses gcc 4.6, but Android's system header files don't mark the read() and write() syscalls with the warn_unused_result attribute. gcc doesn't let you cast away warn_unused_result warnings with (void), so this patch "handles" read() or write() errors with an empty body. I didn't see a obvious way to handle or log these errors, but the code looks like it doesn't care anyways.
Reporter | ||
Comment 4•10 years ago
|
||
Comment on attachment 8451133 [details] [diff] [review] 1034140_consume-unused-return-values.patch Chris, this seems to fix the build errors for me. Thanks!
Attachment #8451133 -
Flags: feedback?(bkelly) → feedback+
Assignee | ||
Comment 5•10 years ago
|
||
Comment on attachment 8451133 [details] [diff] [review] 1034140_consume-unused-return-values.patch Paul: gcc doesn't let you cast away warn_unused_result warnings with `(void)read(...)`, so this patch "handles" read() or write() errors with an if statement with an empty body. Would you prefer that we actually do something to handle read(control_fd_read) or write(control_fd_write) errors?
Attachment #8451133 -
Attachment filename: 1034140_consume-unused-return-values.patch → consume-unused-return-values.patch
Attachment #8451133 -
Flags: review?(paul)
Updated•10 years ago
|
Attachment #8451133 -
Flags: review?(paul) → review+
Reporter | ||
Comment 6•10 years ago
|
||
Any reason not to land this? :-) Adding checkin-needed.
Keywords: checkin-needed
Assignee | ||
Comment 8•10 years ago
|
||
Laziness? :) Sorry, I know this was breaking your local builds. https://hg.mozilla.org/integration/mozilla-inbound/rev/f97c7b5e2994
Keywords: checkin-needed
Comment 9•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f97c7b5e2994
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•