Closed Bug 754160 Opened 9 years ago Closed 9 years ago

tools/trace-malloc/lib/nsTraceMalloc.c fails to compile

Categories

(Firefox Build System :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mats, Unassigned)

References

Details

(Keywords: regression)

This is a regression in the past few days...

mozconfig:
ac_add_options --disable-debug
ac_add_options --enable-optimize
ac_add_options --disable-tests
ac_add_options --enable-trace-malloc

result (up to date mozilla-central tree):
tools/trace-malloc/lib/nsTraceMalloc.c: In function 'allocation_enumerator':
tools/trace-malloc/lib/nsTraceMalloc.c:1758:13: warning: passing argument 1 of 'nsGetTypeName' discards 'const' qualifier from pointer target type [enabled by default]
tools/trace-malloc/lib/nsTypeInfo.h:46:20: note: expected 'void *' but argument is of type 'const void *'
tools/trace-malloc/lib/nsTraceMalloc.c: In function 'log_header':
tools/trace-malloc/lib/nsTraceMalloc.c:1352:5: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
tools/trace-malloc/lib/nsTraceMalloc.c:1353:5: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]

using gcc 4.6.1 on Linux x86-64
"ac_add_options --disable-warnings-as-errors" doesn't help,
the -Werror=unused-result is still added to the flags :-(
xpcom/base/MapsMemoryReporter.cpp:342:21: error: ignoring return value of ‘int fscanf(FILE*, const char*, ...)’, declared with attribute warn_unused_result [-Werror=unused-result]
memory/jemalloc/jemalloc.c: In function 'wrtmessage':
memory/jemalloc/jemalloc.c:1530:8: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
memory/jemalloc/jemalloc.c:1531:8: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
memory/jemalloc/jemalloc.c:1532:8: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
memory/jemalloc/jemalloc.c:1533:8: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
cc1: some warnings being treated as errors
Blocks: 736501
fixed in bug 754198
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.