The default bug view has changed. See this FAQ.

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

RESOLVED FIXED

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mats, Unassigned)

Tracking

(Blocks: 1 bug, {regression})

Trunk
x86_64
Linux
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
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
(Reporter)

Comment 1

5 years ago
"ac_add_options --disable-warnings-as-errors" doesn't help,
the -Werror=unused-result is still added to the flags :-(
(Reporter)

Comment 2

5 years ago
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]
(Reporter)

Comment 3

5 years ago
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
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.