Last Comment Bug 754160 - tools/trace-malloc/lib/nsTraceMalloc.c fails to compile
: tools/trace-malloc/lib/nsTraceMalloc.c fails to compile
Status: RESOLVED FIXED
: regression
Product: Core
Classification: Components
Component: Build Config (show other bugs)
: Trunk
: x86_64 Linux
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks: 736501
  Show dependency treegraph
 
Reported: 2012-05-10 20:15 PDT by Mats Palmgren (:mats)
Modified: 2012-05-11 12:38 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments

Description Mats Palmgren (:mats) 2012-05-10 20:15:19 PDT
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
Comment 1 Mats Palmgren (:mats) 2012-05-10 20:51:52 PDT
"ac_add_options --disable-warnings-as-errors" doesn't help,
the -Werror=unused-result is still added to the flags :-(
Comment 2 Mats Palmgren (:mats) 2012-05-10 20:55:32 PDT
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]
Comment 3 Mats Palmgren (:mats) 2012-05-10 21:03:18 PDT
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
Comment 4 [:fabrice] Fabrice Desré 2012-05-11 12:38:26 PDT
fixed in bug 754198

Note You need to log in before you can comment on or make changes to this bug.